473,413 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Call to perl script in image tag does not execute

There are two pl files: realtimechart.pl and realtimedemo.pl
realtimechart generates a realtime graph which would an image file(png,gif,jpeg etc)
and realtimedemo generates a html file alongwith the graph produced by realtimechart and also refreshes it using the image id. But somehow it is not taking the chart generated from realtimechart.pl. There is some problem in this statement

<img id="ChartImage1" src= "realtimechart.pl?chartId=demoChart1">

because instead of executing realtimechart.pl, it treats everything as non-executable statements

Please help me out with this quickly
Dec 26 '08 #1
27 4800
KevinADC
4,059 Expert 2GB
this is just some html code that calls the script:

<img id="ChartImage1" src= "realtimechart.pl?chartId=demoChart1">

I am not sure what you mean by: "it treats everything as non-executable statements".
Dec 26 '08 #2
it is not executing realtimechart.pl and treating everything after "src = " as just a file location
Dec 27 '08 #3
numberwhun
3,509 Expert Mod 2GB
@parashar123
Looking at the options available to the img tag, src is definitely one of them, but if you read the description of src in that link, it is supposed to be the url of the image to display. I personally don't know if putting a Perl script with its options into their would actually return an image to be displayed.

The script would probably have to be cgi since what is expected is a URL, so you may want to format the src as follows:

Expand|Select|Wrap|Line Numbers
  1. <imgid="ChartImage1" src="http:/localhost/cgi-bin/realtimechart.pl?chartId=demoChart1">
  2.  
You may want to try whatever you use for the URL in your own browser and see what it returns first as it will have to return an image.

Regards,

Jeff
Dec 27 '08 #4
KevinADC
4,059 Expert 2GB
@parashar123
Thats fine, because it is a file/uri path. But why it is not causing the perl script to run and return an image is the part that is the problem. Without more information I also suggest you try using the full URL to the perl script in the image tag. If that does not help continue reading the instructions that hopefully came with the script for further advise. I don't know anything about that script so there is no way to help you further.

Jeff,

The <img> tag only needs the correct MIME declaration and a valid image file and the browser will display it, similar to how you can use a perl script to generate an entire html document on the fly and return it to the browser and the browser will display it just like any other html document.
Dec 27 '08 #5
numberwhun
3,509 Expert Mod 2GB
@KevinADC

Ok then, that's fine, but I would still make sure that the script call that was input into the src piece actually returns an image file and not an error.

Regards,

Jeff
Dec 27 '08 #6
KevinADC
4,059 Expert 2GB
Yes, the img tag will not display text, so if the perl script is returning an error the person will need to look in the servers error log or try running the script directly.
Dec 27 '08 #7
eWish
971 Expert 512MB
Not printing the proper MIME type in the headers could be causing problems.

--Kevin
Dec 28 '08 #8
I tried putting the path of the script file in the src path, butit didn't work. Now I can't use http as I would need some server where I can store that script but unfortunately I don't have any such thing.
I tried
<img id="ChartImage1" src="C:/Perl/lib//cgi-bin/realtimechart.pl?chartId=demoChart1">
but it didn't work, can anybody suggest how to execute this script on the local machine in src

Thanks all for your hrlp
Dec 29 '08 #9
numberwhun
3,509 Expert Mod 2GB
@parashar123
Unless you can possibly share the script with us (enclosed in code tags) so that we can see it, I have to say no. We are not familiar with the inner workings of the script and like you, would have to take a look at it to see how it works.

Regards,

Jeff
Dec 29 '08 #10
Hereby attached are the two scripts and also I some library files which you need to copy into C;/Perl/Lib

It could be great if you let me know the solution
Attached Files
File Type: zip Desktop.zip (14.5 KB, 89 views)
Dec 29 '08 #11
numberwhun
3,509 Expert Mod 2GB
@parashar123
In that script there is a module called "perlchartdir'. Unfortunately, it is nothing I have an I cannot play with the script without it. Is this something you wrote? If so, can you provide it as well?

Regards,

Jeff
Dec 29 '08 #12
Sorry, forgot to attach that. Here it goes... Please copy this financechart.pm into chartdirectory library and then copy chartdirexctory library to perl/lib
Attached Files
File Type: zip FinanceChart.zip (13.1 KB, 73 views)
Dec 29 '08 #13
Please hereby find the chartdirectory library
Attached Files
File Type: zip ChartDirector.zip (35.9 KB, 81 views)
Dec 29 '08 #14
I am not able to attach chartdir.dll as even after zipping it, it's size is exceeding. If you provide me your email id, I can send it through email.
Dec 29 '08 #15
KevinADC
4,059 Expert 2GB
Well, if the perl script is meant to run as a CGI you have to run it in the browser using an http server. Trying to run it in the browser without using the http server will not work. You can install apache on your windows box and run your scripts just like they are run on the internet. Google for "how to setup apache windows". You also need to have perl installed, which I assume you do already.
Dec 29 '08 #16
numberwhun
3,509 Expert Mod 2GB
I agree with Kevin as to the running of the script, but I wasn't referring to chartdir.dll. I was instead referring to perlchartdir.pm, one of the perl modules used in the script.

Regards,

Jeff
Dec 29 '08 #17
Perl script is not getting executed. printenv.pl is kept in C:\Program Files\Apache Group\Apache2\cgi-bin. printenv.pl contains the perl statement just to print a line.

I installed Apache and also started the service. I opened up the browser and typed in http://localhost to verify whether the it has been properly installed or not. I am attaching the webpages displayed on running http://localhost and http://localhost/printenv.pl

Also I did all the settings needed which are depicted in the file(pdf) attached hereby but still there is no output. Also I am attaching the httpdconf file which contains all the settings.

Please help me out with why the perl script is not getting executed
Attached Images
File Type: jpg Apache.jpg (15.4 KB, 263 views)
Jan 2 '09 #18
Sorry I am not able to add other attachments due to size limit.
Jan 2 '09 #19
numberwhun
3,509 Expert Mod 2GB
Can you please post the contents of your script here (inside of code tags please) so that we can see what you have in it?

Also, even though you have installed Apache and started it, you may still have to set it to allow cgi-bin files to execute. Here is a tutorial from the Apache foundation for doing that.

You will have to make sure that is done before trying to run any cgi scripts.

Thanks!

Jeff
Jan 2 '09 #20
All settings are OK except one i.e. .htaccess fle. There is no such file. So what I did is I made a config.htaccess file in cgi-bin directory and copied Options +ExecCGI into it. Rest all settings are fine.

printenv.pl is at C:\Program Files\Apache Group\Apache2\cgi-bin

Finally on typing http://localhost/printenv.pl, I get http 404 error i.e.

The webpage cannot be found
HTTP 404
Most likely causes:
There might be a typing error in the address.
If you clicked on a link, it may be out of date.

What you can try:
Retype the address.

Go back to the previous page.

Go to and look for the information you want.

More information

This error (HTTP 404 Not Found) means that Internet Explorer was able to connect to the website, but the page you wanted was not found. It's possible that the webpage is temporarily unavailable. Alternatively, the website might have changed or removed the webpage.

For more information about HTTP errors, see Help.

But when I went to see the error log, I found something strange. The error displayed is

[error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/printenv.pl

But I don't understand that how come it is going to htdocs for that .pl file? And what should be the remedy for that now?
Jan 5 '09 #21
numberwhun
3,509 Expert Mod 2GB
@parashar123
It is going to htdocs because that is your documentRoot and that is where you told it to go. To tell it to execute your script in the cgi-bin directory, you should tell it specifically that:

Expand|Select|Wrap|Line Numbers
  1. http://localhost/cgi-bin/printenv.pl
  2.  
Regards,

Jeff
Jan 5 '09 #22
Hi Jeff

I appreciate your kind help for solving this problem. Actually I did http://localhost/cgi-bin/printenv.pl, but what it did is instead of running that script and displaying the result on screen.

It gives me a save/open dialog for that script. What should I do so that instead of displaying that dialog for save/run that script, it directly runs and displays the result on the screen. I am below pasting the contents of my httpd.conf file.

Expand|Select|Wrap|Line Numbers
  1. #
  2. # Based upon the NCSA server configuration files originally by Rob McCool.
  3. #
  4. # This is the main Apache server configuration file.  It contains the
  5. # configuration directives that give the server its instructions.
  6. # See <URL:http://httpd.apache.org/docs/2.0/> for detailed information about
  7. # the directives.
  8. #
  9. # Do NOT simply read the instructions in here without understanding
  10. # what they do.  They're here only as hints or reminders.  If you are unsure
  11. # consult the online docs. You have been warned.  
  12. #
  13. # The configuration directives are grouped into three basic sections:
  14. #  1. Directives that control the operation of the Apache server process as a
  15. #     whole (the 'global environment').
  16. #  2. Directives that define the parameters of the 'main' or 'default' server,
  17. #     which responds to requests that aren't handled by a virtual host.
  18. #     These directives also provide default values for the settings
  19. #     of all virtual hosts.
  20. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  21. #     different IP addresses or hostnames and have them handled by the
  22. #     same Apache server process.
  23. #
  24. # Configuration and logfile names: If the filenames you specify for many
  25. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  26. # server will use that explicit path.  If the filenames do *not* begin
  27. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  28. # with ServerRoot set to "C:/Program Files/Apache Group/Apache2" will be interpreted by the
  29. # server as "C:/Program Files/Apache Group/Apache2/logs/foo.log".
  30. #
  31. # NOTE: Where filenames are specified, you must use forward slashes
  32. # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
  33. # If a drive letter is omitted, the drive on which Apache.exe is located
  34. # will be used by default.  It is recommended that you always supply
  35. # an explicit drive letter in absolute paths, however, to avoid
  36. # confusion.
  37. #
  38.  
  39. ### Section 1: Global Environment
  40. #
  41. # The directives in this section affect the overall operation of Apache,
  42. # such as the number of concurrent requests it can handle or where it
  43. # can find its configuration files.
  44. #
  45.  
  46. #
  47. # ServerRoot: The top of the directory tree under which the server's
  48. # configuration, error, and log files are kept.
  49. #
  50. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  51. # mounted filesystem then please read the LockFile documentation (available
  52. # at <URL:http://httpd.apache.org/docs/2.0/mod/mpm_common.html#lockfile>);
  53. # you will save yourself a lot of trouble.
  54. #
  55. # Do NOT add a slash at the end of the directory path.
  56. #
  57. ServerRoot "C:/Program Files/Apache Group/Apache2"
  58.  
  59. #
  60. # ScoreBoardFile: File used to store internal server process information.
  61. # If unspecified (the default), the scoreboard will be stored in an
  62. # anonymous shared memory segment, and will be unavailable to third-party
  63. # applications.
  64. # If specified, ensure that no two invocations of Apache share the same
  65. # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
  66. #
  67. #ScoreBoardFile logs/apache_runtime_status
  68.  
  69. #
  70. # PidFile: The file in which the server should record its process
  71. # identification number when it starts.
  72. #
  73. PidFile logs/httpd.pid
  74.  
  75. #
  76. # Timeout: The number of seconds before receives and sends time out.
  77. #
  78. Timeout 300
  79.  
  80. #
  81. # KeepAlive: Whether or not to allow persistent connections (more than
  82. # one request per connection). Set to "Off" to deactivate.
  83. #
  84. KeepAlive On
  85.  
  86. #
  87. # MaxKeepAliveRequests: The maximum number of requests to allow
  88. # during a persistent connection. Set to 0 to allow an unlimited amount.
  89. # We recommend you leave this number high, for maximum performance.
  90. #
  91. MaxKeepAliveRequests 100
  92.  
  93. #
  94. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  95. # same client on the same connection.
  96. #
  97. KeepAliveTimeout 15
  98.  
  99. ##
  100. ## Server-Pool Size Regulation (MPM specific)
  101. ## 
  102.  
  103. # WinNT MPM
  104. # ThreadsPerChild: constant number of worker threads in the server process
  105. # MaxRequestsPerChild: maximum  number of requests a server process serves
  106. <IfModule mpm_winnt.c>
  107. ThreadsPerChild 250
  108. MaxRequestsPerChild  0
  109. </IfModule>
  110.  
  111. #
  112. # Listen: Allows you to bind Apache to specific IP addresses and/or
  113. # ports, instead of the default. See also the <VirtualHost>
  114. # directive.
  115. #
  116. # Change this to Listen on specific IP addresses as shown below to 
  117. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  118. #
  119. #Listen 12.34.56.78:80
  120. Listen 80
  121.  
  122. #
  123. # Dynamic Shared Object (DSO) Support
  124. #
  125. # To be able to use the functionality of a module which was built as a DSO you
  126. # have to place corresponding `LoadModule' lines at this location so the
  127. # directives contained in it are actually available _before_ they are used.
  128. # Statically compiled modules (those listed by `httpd -l') do not need
  129. # to be loaded here.
  130. #
  131. # Example:
  132. # LoadModule foo_module modules/mod_foo.so
  133. #
  134. LoadModule access_module modules/mod_access.so
  135. LoadModule actions_module modules/mod_actions.so
  136. LoadModule alias_module modules/mod_alias.so
  137. LoadModule asis_module modules/mod_asis.so
  138. LoadModule auth_module modules/mod_auth.so
  139. #LoadModule auth_anon_module modules/mod_auth_anon.so
  140. #LoadModule auth_dbm_module modules/mod_auth_dbm.so
  141. #LoadModule auth_digest_module modules/mod_auth_digest.so
  142. LoadModule autoindex_module modules/mod_autoindex.so
  143. #LoadModule cern_meta_module modules/mod_cern_meta.so
  144. LoadModule cgi_module modules/mod_cgi.so
  145. #LoadModule dav_module modules/mod_dav.so
  146. #LoadModule dav_fs_module modules/mod_dav_fs.so
  147. LoadModule dir_module modules/mod_dir.so
  148. LoadModule env_module modules/mod_env.so
  149. #LoadModule expires_module modules/mod_expires.so
  150. #LoadModule file_cache_module modules/mod_file_cache.so
  151. #LoadModule headers_module modules/mod_headers.so
  152. LoadModule imap_module modules/mod_imap.so
  153. LoadModule include_module modules/mod_include.so
  154. #LoadModule info_module modules/mod_info.so
  155. LoadModule isapi_module modules/mod_isapi.so
  156. LoadModule log_config_module modules/mod_log_config.so
  157. LoadModule mime_module modules/mod_mime.so
  158. #LoadModule mime_magic_module modules/mod_mime_magic.so
  159. #LoadModule proxy_module modules/mod_proxy.so
  160. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  161. #LoadModule proxy_http_module modules/mod_proxy_http.so
  162. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  163. LoadModule negotiation_module modules/mod_negotiation.so
  164. #LoadModule rewrite_module modules/mod_rewrite.so
  165. LoadModule setenvif_module modules/mod_setenvif.so
  166. #LoadModule speling_module modules/mod_speling.so
  167. #LoadModule status_module modules/mod_status.so
  168. #LoadModule unique_id_module modules/mod_unique_id.so
  169. LoadModule userdir_module modules/mod_userdir.so
  170. #LoadModule usertrack_module modules/mod_usertrack.so
  171. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
  172. #LoadModule ssl_module modules/mod_ssl.so
  173.  
  174. <IfModule mime_module>
  175.  
  176. AddHandler cgi-script .cgi .pl
  177.  
  178. AddType text/html .shtml
  179. AddOutputFilter INCLUDES .shtml
  180.  
  181. </IfModule>
  182.  
  183. #
  184. # ExtendedStatus controls whether Apache will generate "full" status
  185. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  186. # Off) when the "server-status" handler is called. The default is Off.
  187. #
  188. #ExtendedStatus On
  189.  
  190. ### Section 2: 'Main' server configuration
  191. #
  192. # The directives in this section set up the values used by the 'main'
  193. # server, which responds to any requests that aren't handled by a
  194. # <VirtualHost> definition.  These values also provide defaults for
  195. # any <VirtualHost> containers you may define later in the file.
  196. #
  197. # All of these directives may appear inside <VirtualHost> containers,
  198. # in which case these default settings will be overridden for the
  199. # virtual host being defined.
  200. #
  201.  
  202. #
  203. # ServerAdmin: Your address, where problems with the server should be
  204. # e-mailed.  This address appears on some server-generated pages, such
  205. # as error documents.  e.g. admin@your-domain.com
  206. #
  207. ServerAdmin admin@sisodomain.com
  208.  
  209. #
  210. # ServerName gives the name and port that the server uses to identify itself.
  211. # This can often be determined automatically, but we recommend you specify
  212. # it explicitly to prevent problems during startup.
  213. #
  214. # If this is not set to valid DNS name for your host, server-generated
  215. # redirections will not work.  See also the UseCanonicalName directive.
  216. #
  217. # If your host doesn't have a registered DNS name, enter its IP address here.
  218. # You will have to access it by its address anyway, and this will make 
  219. # redirections work in a sensible way.
  220. #
  221. ServerName parashard.sisodomain.com:80
  222.  
  223. #
  224. # UseCanonicalName: Determines how Apache constructs self-referencing 
  225. # URLs and the SERVER_NAME and SERVER_PORT variables.
  226. # When set "Off", Apache will use the Hostname and Port supplied
  227. # by the client.  When set "On", Apache will use the value of the
  228. # ServerName directive.
  229. #
  230. UseCanonicalName Off
  231.  
  232. #
  233. # DocumentRoot: The directory out of which you will serve your
  234. # documents. By default, all requests are taken from this directory, but
  235. # symbolic links and aliases may be used to point to other locations.
  236. #
  237. DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
  238.  
  239. #
  240. # Each directory to which Apache has access can be configured with respect
  241. # to which services and features are allowed and/or disabled in that
  242. # directory (and its subdirectories). 
  243. #
  244. # First, we configure the "default" to be a very restrictive set of 
  245. # features.  
  246. #
  247. <Directory />
  248.     Options FollowSymLinks
  249.     AllowOverride None
  250. </Directory>
  251.  
  252. #
  253. # Note that from this point forward you must specifically allow
  254. # particular features to be enabled - so if something's not working as
  255. # you might expect, make sure that you have specifically enabled it
  256. # below.
  257. #
  258.  
  259. #
  260. # This should be changed to whatever you set DocumentRoot to.
  261. #
  262. <Directory "C:/Program Files/Apache Group/Apache2/htdocs">
  263.  
  264. #Options Indexes FollowSymLinks +IncludesNOEXEC
  265.  
  266. #Options +Includes +ExecCGI
  267.  
  268.  
  269. #
  270. # Possible values for the Options directive are "None", "All",
  271. # or any combination of:
  272. #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  273. #
  274. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  275. # doesn't give it to you.
  276. #
  277. # The Options directive is both complicated and important.  Please see
  278. core - Apache HTTP Server
  279. # for more information.
  280. #
  281.     Options Indexes FollowSymLinks
  282.  
  283. #
  284. # AllowOverride controls what directives may be placed in .htaccess files.
  285. # It can be "All", "None", or any combination of the keywords:
  286. #   Options FileInfo AuthConfig Limit
  287. #
  288.     AllowOverride All
  289.  
  290. #
  291. # Controls who can get stuff from this server.
  292. #
  293.     Order allow,deny
  294.     Allow from all
  295.  
  296. </Directory>
  297.  
  298. #
  299. # UserDir: The name of the directory that is appended onto a user's home
  300. # directory if a ~user request is received.  Be especially careful to use
  301. # proper, forward slashes here.  On Windows NT, "Personal/My Website"
  302. # is a more appropriate choice.
  303. #
  304. UserDir "My Documents/My Website"
  305.  
  306. #
  307. # Control access to UserDir directories.  The following is an example
  308. # for a site where these directories are restricted to read-only.
  309. #
  310. # You must correct the path for the root to match your system's configured
  311. # user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website"
  312. # or whichever, as appropriate.
  313. #
  314. #<Directory "C:/Documents and Settings/*/My Documents/My Website">
  315. #    AllowOverride FileInfo AuthConfig Limit
  316. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  317. #    <Limit GET POST OPTIONS PROPFIND>
  318. #        Order allow,deny
  319. #        Allow from all
  320. #    </Limit>
  321. #    <LimitExcept GET POST OPTIONS PROPFIND>
  322. #        Order deny,allow
  323. #        Deny from all
  324. #    </LimitExcept>
  325. #</Directory>
  326.  
  327. #
  328. # DirectoryIndex: sets the file that Apache will serve if a directory
  329. # is requested.
  330. #
  331. # The index.html.var file (a type-map) is used to deliver content-
  332. # negotiated documents.  The MultiViews Option can be used for the 
  333. # same purpose, but it is much slower.
  334. #
  335. DirectoryIndex index.html index.html.var
  336.  
  337. #
  338. # AccessFileName: The name of the file to look for in each directory
  339. # for additional configuration directives.  See also the AllowOverride 
  340. # directive.
  341. #
  342. AccessFileName .htaccess
  343.  
  344. #
  345. # The following lines prevent .htaccess and .htpasswd files from being 
  346. # viewed by Web clients. 
  347. #
  348. <FilesMatch "^\.ht">
  349.     Order allow,deny
  350.     Deny from all
  351. </FilesMatch>
  352.  
  353. #
  354. # TypesConfig describes where the mime.types file (or equivalent) is
  355. # to be found.
  356. #
  357. TypesConfig conf/mime.types
  358.  
  359. #
  360. # DefaultType is the default MIME type the server will use for a document
  361. # if it cannot otherwise determine one, such as from filename extensions.
  362. # If your server contains mostly text or HTML documents, "text/plain" is
  363. # a good value.  If most of your content is binary, such as applications
  364. # or images, you may want to use "application/octet-stream" instead to
  365. # keep browsers from trying to display binary files as though they are
  366. # text.
  367. #
  368. DefaultType text/plain
  369.  
  370. #
  371. # The mod_mime_magic module allows the server to use various hints from the
  372. # contents of the file itself to determine its type.  The MIMEMagicFile
  373. # directive tells the module where the hint definitions are located.
  374. #
  375. <IfModule mod_mime_magic.c>
  376.     MIMEMagicFile conf/magic
  377. </IfModule>
  378.  
  379. #
  380. # HostnameLookups: Log the names of clients or just their IP addresses
  381. # e.g., Welcome! - The Apache Software Foundation (on) or 204.62.129.132 (off).
  382. # The default is off because it'd be overall better for the net if people
  383. # had to knowingly turn this feature on, since enabling it means that
  384. # each client request will result in AT LEAST one lookup request to the
  385. # nameserver.
  386. #
  387. HostnameLookups Off
  388.  
  389. #
  390. # EnableMMAP: Control whether memory-mapping is used to deliver
  391. # files (assuming that the underlying OS supports it).
  392. # The default is on; turn this off if you serve from NFS-mounted 
  393. # filesystems.  On some systems, turning it off (regardless of
  394. # filesystem) can improve performance; for details, please see
  395. core - Apache HTTP Server
  396. #
  397. #EnableMMAP off
  398.  
  399. #
  400. # EnableSendfile: Control whether the sendfile kernel support is 
  401. # used  to deliver files (assuming that the OS supports it).
  402. # The default is on; turn this off if you serve from NFS-mounted 
  403. # filesystems.  Please see
  404. core - Apache HTTP Server
  405. #
  406. #EnableSendfile off
  407.  
  408. #
  409. # ErrorLog: The location of the error log file.
  410. # If you do not specify an ErrorLog directive within a <VirtualHost>
  411. # container, error messages relating to that virtual host will be
  412. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  413. # container, that host's errors will be logged there and not here.
  414. #
  415. ErrorLog logs/error.log
  416.  
  417. #
  418. # LogLevel: Control the number of messages logged to the error.log.
  419. # Possible values include: debug, info, notice, warn, error, crit,
  420. # alert, emerg.
  421. #
  422. LogLevel warn
  423.  
  424. #
  425. # The following directives define some format nicknames for use with
  426. # a CustomLog directive (see below).
  427. #
  428. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  429. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  430. LogFormat "%{Referer}i -> %U" referer
  431. LogFormat "%{User-agent}i" agent
  432.  
  433. # You need to enable mod_logio.c to use %I and %O
  434. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  435.  
  436. #
  437. # The location and format of the access logfile (Common Logfile Format).
  438. # If you do not define any access logfiles within a <VirtualHost>
  439. # container, they will be logged here.  Contrariwise, if you *do*
  440. # define per-<VirtualHost> access logfiles, transactions will be
  441. # logged therein and *not* in this file.
  442. #
  443. CustomLog logs/access.log common
  444.  
  445. #
  446. # If you would like to have agent and referer logfiles, uncomment the
  447. # following directives.
  448. #
  449. #CustomLog logs/referer.log referer
  450. #CustomLog logs/agent.log agent
  451.  
  452. #
  453. # If you prefer a single logfile with access, agent, and referer information
  454. # (Combined Logfile Format) you can use the following directive.
  455. #
  456. #CustomLog logs/access.log combined
  457.  
  458. #
  459. # ServerTokens
  460. # This directive configures what you return as the Server HTTP response
  461. # Header. The default is 'Full' which sends information about the OS-Type
  462. # and compiled in modules.
  463. # Set to one of:  Full | OS | Minor | Minimal | Major | Prod
  464. # where Full conveys the most information, and Prod the least.
  465. #
  466. ServerTokens Full
  467.  
  468. #
  469. # Optionally add a line containing the server version and virtual host
  470. # name to server-generated pages (internal error documents, FTP directory 
  471. # listings, mod_status and mod_info output etc., but not CGI generated 
  472. # documents or custom error documents).
  473. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  474. # Set to one of:  On | Off | EMail
  475. #
  476. ServerSignature On
  477.  
  478. #
  479. # Aliases: Add here as many aliases as you need (with no limit). The format is 
  480. # Alias fakename realname
  481. #
  482. # Note that if you include a trailing / on fakename then the server will
  483. # require it to be present in the URL.  So "/icons" isn't aliased in this
  484. # example, only "/icons/".  If the fakename is slash-terminated, then the 
  485. # realname must also be slash terminated, and if the fakename omits the 
  486. # trailing slash, the realname must also omit it.
  487. #
  488. # We include the /icons/ alias for FancyIndexed directory listings.  If you
  489. # do not use FancyIndexing, you may comment this out.
  490. #
  491. Alias /icons/ "C:/Program Files/Apache Group/Apache2/icons/"
  492.  
  493. <Directory "C:/Program Files/Apache Group/Apache2/icons">
  494.     Options Indexes MultiViews
  495.     AllowOverride None
  496.     Order allow,deny
  497.     Allow from all
  498. </Directory>
  499.  
  500. #
  501. # This should be changed to the ServerRoot/manual/.  The alias provides
  502. # the manual, even if you choose to move your DocumentRoot.  You may comment
  503. # this out if you do not care for the documentation.
  504. #
  505. AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "C:/Program Files/Apache Group/Apache2/manual$1"
  506.  
  507. <Directory "C:/Program Files/Apache Group/Apache2/manual">
  508.     Options Indexes
  509.     AllowOverride None
  510.     Order allow,deny
  511.     Allow from all
  512.  
  513.     <Files *.html>
  514.         SetHandler type-map
  515.     </Files>
  516.  
  517.     SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
  518.     RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
  519. </Directory>
  520.  
  521. #
  522. # ScriptAlias: This controls which directories contain server scripts.
  523. # ScriptAliases are essentially the same as Aliases, except that
  524. # documents in the realname directory are treated as applications and
  525. # run by the server when requested rather than as documents sent to the client.
  526. # The same rules about trailing "/" apply to ScriptAlias directives as to
  527. # Alias.
  528. #
  529. ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
  530.  
  531. #
  532. # "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
  533. # CGI directory exists, if you have that configured.
  534. #
  535. <Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
  536.     AllowOverride Options
  537.     Options None
  538.     Order allow,deny
  539.     Allow from all
  540. </Directory>
  541.  
  542. #
  543. # Redirect allows you to tell clients about documents which used to exist in
  544. # your server's namespace, but do not anymore. This allows you to tell the
  545. # clients where to look for the relocated document.
  546. # Example:
  547. # Redirect permanent /foo http://www.example.com/bar
  548.  
  549. #
  550. # Directives controlling the display of server-generated directory listings.
  551. #
  552.  
  553. #
  554. # IndexOptions: Controls the appearance of server-generated directory
  555. # listings.
  556. #
  557. IndexOptions FancyIndexing VersionSort
  558.  
  559. #
  560. # AddIcon* directives tell the server which icon to show for different
  561. # files or filename extensions.  These are only displayed for
  562. # FancyIndexed directories.
  563. #
  564. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  565.  
  566. AddIconByType (TXT,/icons/text.gif) text/*
  567. AddIconByType (IMG,/icons/image2.gif) image/*
  568. AddIconByType (SND,/icons/sound2.gif) audio/*
  569. AddIconByType (VID,/icons/movie.gif) video/*
  570.  
  571. AddIcon /icons/binary.gif .bin .exe
  572. AddIcon /icons/binhex.gif .hqx
  573. AddIcon /icons/tar.gif .tar
  574. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  575. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  576. AddIcon /icons/a.gif .ps .ai .eps
  577. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  578. AddIcon /icons/text.gif .txt
  579. AddIcon /icons/c.gif .c
  580. AddIcon /icons/p.gif .pl .py
  581. AddIcon /icons/f.gif .for
  582. AddIcon /icons/dvi.gif .dvi
  583. AddIcon /icons/uuencoded.gif .uu
  584. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  585. AddIcon /icons/tex.gif .tex
  586. AddIcon /icons/bomb.gif core
  587.  
  588. AddIcon /icons/back.gif ..
  589. AddIcon /icons/hand.right.gif README
  590. AddIcon /icons/folder.gif ^^DIRECTORY^^
  591. AddIcon /icons/blank.gif ^^BLANKICON^^
  592.  
  593. #
  594. # DefaultIcon is which icon to show for files which do not have an icon
  595. # explicitly set.
  596. #
  597. DefaultIcon /icons/unknown.gif
  598.  
  599. #
  600. # AddDescription allows you to place a short description after a file in
  601. # server-generated indexes.  These are only displayed for FancyIndexed
  602. # directories.
  603. # Format: AddDescription "description" filename
  604. #
  605. #AddDescription "GZIP compressed document" .gz
  606. #AddDescription "tar archive" .tar
  607. #AddDescription "GZIP compressed tar archive" .tgz
  608.  
  609. #
  610. # ReadmeName is the name of the README file the server will look for by
  611. # default, and append to directory listings.
  612. #
  613. # HeaderName is the name of a file which should be prepended to
  614. # directory indexes. 
  615. ReadmeName README.html
  616. HeaderName HEADER.html
  617.  
  618. #
  619. # IndexIgnore is a set of filenames which directory indexing should ignore
  620. # and not include in the listing.  Shell-style wildcarding is permitted.
  621. #
  622. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  623.  
  624. #
  625. # DefaultLanguage and AddLanguage allows you to specify the language of 
  626. # a document. You can then use content negotiation to give a browser a 
  627. # file in a language the user can understand.
  628. #
  629. # Specify a default language. This means that all data
  630. # going out without a specific language tag (see below) will 
  631. # be marked with this one. You probably do NOT want to set
  632. # this unless you are sure it is correct for all cases.
  633. #
  634. # * It is generally better to not mark a page as 
  635. # * being a certain language than marking it with the wrong
  636. # * language!
  637. #
  638. # DefaultLanguage nl
  639. #
  640. # Note 1: The suffix does not have to be the same as the language
  641. # keyword --- those with documents in Polish (whose net-standard
  642. # language code is pl) may wish to use "AddLanguage pl .po" to
  643. # avoid the ambiguity with the common suffix for perl scripts.
  644. #
  645. # Note 2: The example entries below illustrate that in some cases 
  646. # the two character 'Language' abbreviation is not identical to 
  647. # the two character 'Country' code for its country,
  648. # E.g. 'Danmark/dk' versus 'Danish/da'.
  649. #
  650. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  651. # specifier. There is 'work in progress' to fix this and get
  652. # the reference data for rfc1766 cleaned up.
  653. #
  654. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  655. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  656. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  657. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  658. # Norwegian (no) - Polish (pl) - Portugese (pt)
  659. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  660. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  661. #
  662. AddLanguage ca .ca
  663. AddLanguage cs .cz .cs
  664. AddLanguage da .dk
  665. AddLanguage de .de
  666. AddLanguage el .el
  667. AddLanguage en .en
  668. AddLanguage eo .eo
  669. AddLanguage es .es
  670. AddLanguage et .et
  671. AddLanguage fr .fr
  672. AddLanguage he .he
  673. AddLanguage hr .hr
  674. AddLanguage it .it
  675. AddLanguage ja .ja
  676. AddLanguage ko .ko
  677. AddLanguage ltz .ltz
  678. AddLanguage nl .nl
  679. AddLanguage nn .nn
  680. AddLanguage no .no
  681. AddLanguage pl .po
  682. AddLanguage pt .pt
  683. AddLanguage pt-BR .pt-br
  684. AddLanguage ru .ru
  685. AddLanguage sv .sv
  686. AddLanguage zh-CN .zh-cn
  687. AddLanguage zh-TW .zh-tw
  688.  
  689. #
  690. # LanguagePriority allows you to give precedence to some languages
  691. # in case of a tie during content negotiation.
  692. #
  693. # Just list the languages in decreasing order of preference. We have
  694. # more or less alphabetized them here. You probably want to change this.
  695. #
  696. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
  697.  
  698. #
  699. # ForceLanguagePriority allows you to serve a result page rather than
  700. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  701. # [in case no accepted languages matched the available variants]
  702. #
  703. ForceLanguagePriority Prefer Fallback
  704.  
  705. #
  706. # Commonly used filename extensions to character sets. You probably
  707. # want to avoid clashes with the language extensions, unless you
  708. # are good at carefully testing your setup after each change.
  709. # See http://www.iana.org/assignments/character-sets for the
  710. # official list of charset names and their respective RFCs.
  711. #
  712. AddCharset ISO-8859-1  .iso8859-1 .latin1
  713. AddCharset ISO-8859-2  .iso8859-2 .latin2 .cen
  714. AddCharset ISO-8859-3  .iso8859-3 .latin3
  715. AddCharset ISO-8859-4  .iso8859-4 .latin4
  716. AddCharset ISO-8859-5  .iso8859-5 .latin5 .cyr .iso-ru
  717. AddCharset ISO-8859-6  .iso8859-6 .latin6 .arb
  718. AddCharset ISO-8859-7  .iso8859-7 .latin7 .grk
  719. AddCharset ISO-8859-8  .iso8859-8 .latin8 .heb
  720. AddCharset ISO-8859-9  .iso8859-9 .latin9 .trk
  721. AddCharset ISO-2022-JP .iso2022-jp .jis
  722. AddCharset ISO-2022-KR .iso2022-kr .kis
  723. AddCharset ISO-2022-CN .iso2022-cn .cis
  724. AddCharset Big5        .Big5       .big5
  725. # For russian, more than one charset is used (depends on client, mostly):
  726. AddCharset WINDOWS-1251 .cp-1251   .win-1251
  727. AddCharset CP866       .cp866
  728. AddCharset KOI8-r      .koi8-r .koi8-ru
  729. AddCharset KOI8-ru     .koi8-uk .ua
  730. AddCharset ISO-10646-UCS-2 .ucs2
  731. AddCharset ISO-10646-UCS-4 .ucs4
  732. AddCharset UTF-8       .utf8
  733.  
  734. # The set below does not map to a specific (iso) standard
  735. # but works on a fairly wide range of browsers. Note that
  736. # capitalization actually matters (it should not, but it
  737. # does for some browsers).
  738. #
  739. # See http://www.iana.org/assignments/character-sets
  740. # for a list of sorts. But browsers support few.
  741. #
  742. AddCharset GB2312      .gb2312 .gb 
  743. AddCharset utf-7       .utf7
  744. AddCharset utf-8       .utf8
  745. AddCharset big5        .big5 .b5
  746. AddCharset EUC-TW      .euc-tw
  747. AddCharset EUC-JP      .euc-jp
  748. AddCharset EUC-KR      .euc-kr
  749. AddCharset shift_jis   .sjis
  750.  
  751. #
  752. # AddType allows you to add to or override the MIME configuration
  753. # file mime.types for specific file types.
  754. #
  755. #AddType application/x-tar .tgz
  756. #
  757. # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
  758. # information on the fly. Note: Not all browsers support this.
  759. # Despite the name similarity, the following Add* directives have nothing
  760. # to do with the FancyIndexing customization directives above.
  761. #
  762. #AddEncoding x-compress .Z
  763. #AddEncoding x-gzip .gz .tgz
  764. #
  765. # If the AddEncoding directives above are commented-out, then you
  766. # probably should define those extensions to indicate media types:
  767. #
  768. AddType application/x-compress .Z
  769. AddType application/x-gzip .gz .tgz
  770.  
  771. #
  772. # AddHandler allows you to map certain file extensions to "handlers":
  773. # actions unrelated to filetype. These can be either built into the server
  774. # or added with the Action directive (see below)
  775. #
  776. # To use CGI scripts outside of ScriptAliased directories:
  777. # (You will also need to add "ExecCGI" to the "Options" directive.)
  778. #
  779. #AddHandler cgi-script .cgi
  780.  
  781. #
  782. # For files that include their own HTTP headers:
  783. #
  784. #AddHandler send-as-is asis
  785.  
  786. #
  787. # For server-parsed imagemap files:
  788. #
  789. #AddHandler imap-file map
  790.  
  791. #
  792. # For type maps (negotiated resources):
  793. # (This is enabled by default to allow the Apache "It Worked" page
  794. #  to be distributed in multiple languages.)
  795. #
  796. AddHandler type-map var
  797.  
  798. #
  799. # Filters allow you to process content before it is sent to the client.
  800. #
  801. # To parse .shtml files for server-side includes (SSI):
  802. # (You will also need to add "Includes" to the "Options" directive.)
  803. #
  804. #AddType text/html .shtml
  805. #AddOutputFilter INCLUDES .shtml
  806.  
  807. #
  808. # Action lets you define media types that will execute a script whenever
  809. # a matching file is called. This eliminates the need for repeated URL
  810. # pathnames for oft-used CGI file processors.
  811. # Format: Action media/type /cgi-script/location
  812. # Format: Action handler-name /cgi-script/location
  813. #
  814.  
  815. #
  816. # Customizable error responses come in three flavors:
  817. # 1) plain text 2) local redirects 3) external redirects
  818. #
  819. # Some examples:
  820. #ErrorDocument 500 "The server made a boo boo."
  821. #ErrorDocument 404 /missing.html
  822. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  823. #ErrorDocument 402 http://www.example.com/subscription_info.html
  824. #
  825.  
  826. #
  827. # Putting this all together, we can internationalize error responses.
  828. #
  829. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  830. # our collection of by-error message multi-language collections.  We use 
  831. # includes to substitute the appropriate text.
  832. #
  833. # You can modify the messages' appearance without changing any of the
  834. # default HTTP_<error>.html.var files by adding the line:
  835. #
  836. #   Alias /error/include/ "/your/include/path/"
  837. #
  838. # which allows you to create your own set of files by starting with the
  839. # @exp_errordir@/include/ files and copying them to /your/include/path/, 
  840. # even on a per-VirtualHost basis.  The default include files will display
  841. # your Apache version number and your ServerAdmin email address regardless
  842. # of the setting of ServerSignature.
  843. #
  844. # The internationalized error documents require mod_alias, mod_include
  845. # and mod_negotiation.  To activate them, uncomment the following 30 lines.
  846.  
  847. #    Alias /error/ "@exp_errordir@/"
  848. #
  849. #    <Directory "@exp_errordir@">
  850. #        AllowOverride None
  851. #        Options IncludesNoExec
  852. #        AddOutputFilter Includes html
  853. #        AddHandler type-map var
  854. #        Order allow,deny
  855. #        Allow from all
  856. #        LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
  857. #        ForceLanguagePriority Prefer Fallback
  858. #    </Directory>
  859. #
  860. #    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  861. #    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  862. #    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  863. #    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  864. #    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  865. #    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  866. #    ErrorDocument 410 /error/HTTP_GONE.html.var
  867. #    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  868. #    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  869. #    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  870. #    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  871. #    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  872. #    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  873. #    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  874. #    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  875. #    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  876. #    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  877.  
  878.  
  879.  
  880. #
  881. # The following directives modify normal HTTP response behavior to
  882. # handle known problems with browser implementations.
  883. #
  884. BrowserMatch "Mozilla/2" nokeepalive
  885. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  886. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  887. BrowserMatch "Java/1\.0" force-response-1.0
  888. BrowserMatch "JDK/1\.0" force-response-1.0
  889.  
  890. #
  891. # The following directive disables redirects on non-GET requests for
  892. # a directory that does not include the trailing slash.  This fixes a 
  893. # problem with Microsoft WebFolders which does not appropriately handle 
  894. # redirects for folders with DAV methods.
  895. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  896. #
  897. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  898. BrowserMatch "MS FrontPage" redirect-carefully
  899. BrowserMatch "^WebDrive" redirect-carefully
  900. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  901. BrowserMatch "^gnome-vfs" redirect-carefully
  902. BrowserMatch "^XML Spy" redirect-carefully
  903. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  904.  
  905. #
  906. # Allow server status reports generated by mod_status,
  907. # with the URL of http://servername/server-status
  908. # Change the ".sisodomain.com" to match your domain to enable.
  909. #
  910. #<Location /server-status>
  911. #    SetHandler server-status
  912. #    Order deny,allow
  913. #    Deny from all
  914. #    Allow from .sisodomain.com
  915. #</Location>
  916.  
  917. #
  918. # Allow remote server configuration reports, with the URL of
  919. #  http://servername/server-info (requires that mod_info.c be loaded).
  920. # Change the ".sisodomain.com" to match your domain to enable.
  921. #
  922. #<Location /server-info>
  923. #    SetHandler server-info
  924. #    Order deny,allow
  925. #    Deny from all
  926. #    Allow from .sisodomain.com
  927. #</Location>
  928.  
  929.  
  930. #
  931. # Bring in additional module-specific configurations
  932. #
  933. <IfModule mod_ssl.c>
  934.     Include conf/ssl.conf
  935. </IfModule>
  936.  
  937.  
  938. ### Section 3: Virtual Hosts
  939. #
  940. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  941. # machine you can setup VirtualHost containers for them. Most configurations
  942. # use only name-based virtual hosts so the server doesn't need to worry about
  943. # IP addresses. This is indicated by the asterisks in the directives below.
  944. #
  945. # Please see the documentation at 
  946. # <URL:http://httpd.apache.org/docs/2.0/vhosts/>
  947. # for further details before you try to setup virtual hosts.
  948. #
  949. # You may use the command line option '-S' to verify your virtual host
  950. # configuration.
  951.  
  952. #
  953. # Use name-based virtual hosting.
  954. #
  955. #NameVirtualHost *:80
  956.  
  957. #
  958. # VirtualHost example:
  959. # Almost any Apache directive may go into a VirtualHost container.
  960. # The first VirtualHost section is used for requests without a known
  961. # server name.
  962. #
  963. #<VirtualHost *:80>
  964. #    ServerAdmin webmaster@dummy-host.example.com
  965. #    DocumentRoot /www/docs/dummy-host.example.com
  966. #    ServerName dummy-host.example.com
  967. #    ErrorLog logs/dummy-host.example.com-error_log
  968. #    CustomLog logs/dummy-host.example.com-access_log common
  969. #</VirtualHost>
Jan 5 '09 #23
Pasting below the latest, updated httpd.conf file. Please let me know why instead of running perl script, it merely askes me to open/save that script

Expand|Select|Wrap|Line Numbers
  1. #
  2. # Based upon the NCSA server configuration files originally by Rob McCool.
  3. #
  4. # This is the main Apache server configuration file.  It contains the
  5. # configuration directives that give the server its instructions.
  6. # See <URL:http://httpd.apache.org/docs/2.0/> for detailed information about
  7. # the directives.
  8. #
  9. # Do NOT simply read the instructions in here without understanding
  10. # what they do.  They're here only as hints or reminders.  If you are unsure
  11. # consult the online docs. You have been warned.  
  12. #
  13. # The configuration directives are grouped into three basic sections:
  14. #  1. Directives that control the operation of the Apache server process as a
  15. #     whole (the 'global environment').
  16. #  2. Directives that define the parameters of the 'main' or 'default' server,
  17. #     which responds to requests that aren't handled by a virtual host.
  18. #     These directives also provide default values for the settings
  19. #     of all virtual hosts.
  20. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  21. #     different IP addresses or hostnames and have them handled by the
  22. #     same Apache server process.
  23. #
  24. # Configuration and logfile names: If the filenames you specify for many
  25. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  26. # server will use that explicit path.  If the filenames do *not* begin
  27. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  28. # with ServerRoot set to "C:/Program Files/Apache Group/Apache2" will be interpreted by the
  29. # server as "C:/Program Files/Apache Group/Apache2/logs/foo.log".
  30. #
  31. # NOTE: Where filenames are specified, you must use forward slashes
  32. # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
  33. # If a drive letter is omitted, the drive on which Apache.exe is located
  34. # will be used by default.  It is recommended that you always supply
  35. # an explicit drive letter in absolute paths, however, to avoid
  36. # confusion.
  37. #
  38.  
  39. ### Section 1: Global Environment
  40. #
  41. # The directives in this section affect the overall operation of Apache,
  42. # such as the number of concurrent requests it can handle or where it
  43. # can find its configuration files.
  44. #
  45.  
  46. #
  47. # ServerRoot: The top of the directory tree under which the server's
  48. # configuration, error, and log files are kept.
  49. #
  50. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  51. # mounted filesystem then please read the LockFile documentation (available
  52. # at <URL:http://httpd.apache.org/docs/2.0/mod/mpm_common.html#lockfile>);
  53. # you will save yourself a lot of trouble.
  54. #
  55. # Do NOT add a slash at the end of the directory path.
  56. #
  57. ServerRoot "C:/Program Files/Apache Group/Apache2"
  58.  
  59. #
  60. # ScoreBoardFile: File used to store internal server process information.
  61. # If unspecified (the default), the scoreboard will be stored in an
  62. # anonymous shared memory segment, and will be unavailable to third-party
  63. # applications.
  64. # If specified, ensure that no two invocations of Apache share the same
  65. # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
  66. #
  67. #ScoreBoardFile logs/apache_runtime_status
  68.  
  69. #
  70. # PidFile: The file in which the server should record its process
  71. # identification number when it starts.
  72. #
  73. PidFile logs/httpd.pid
  74.  
  75. #
  76. # Timeout: The number of seconds before receives and sends time out.
  77. #
  78. Timeout 300
  79.  
  80. #
  81. # KeepAlive: Whether or not to allow persistent connections (more than
  82. # one request per connection). Set to "Off" to deactivate.
  83. #
  84. KeepAlive On
  85.  
  86. #
  87. # MaxKeepAliveRequests: The maximum number of requests to allow
  88. # during a persistent connection. Set to 0 to allow an unlimited amount.
  89. # We recommend you leave this number high, for maximum performance.
  90. #
  91. MaxKeepAliveRequests 100
  92.  
  93. #
  94. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  95. # same client on the same connection.
  96. #
  97. KeepAliveTimeout 15
  98.  
  99. ##
  100. ## Server-Pool Size Regulation (MPM specific)
  101. ## 
  102.  
  103. # WinNT MPM
  104. # ThreadsPerChild: constant number of worker threads in the server process
  105. # MaxRequestsPerChild: maximum  number of requests a server process serves
  106. <IfModule mpm_winnt.c>
  107. ThreadsPerChild 250
  108. MaxRequestsPerChild  0
  109. </IfModule>
  110.  
  111. #
  112. # Listen: Allows you to bind Apache to specific IP addresses and/or
  113. # ports, instead of the default. See also the <VirtualHost>
  114. # directive.
  115. #
  116. # Change this to Listen on specific IP addresses as shown below to 
  117. # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
  118. #
  119. #Listen 12.34.56.78:80
  120. Listen 80
  121.  
  122. #
  123. # Dynamic Shared Object (DSO) Support
  124. #
  125. # To be able to use the functionality of a module which was built as a DSO you
  126. # have to place corresponding `LoadModule' lines at this location so the
  127. # directives contained in it are actually available _before_ they are used.
  128. # Statically compiled modules (those listed by `httpd -l') do not need
  129. # to be loaded here.
  130. #
  131. # Example:
  132. # LoadModule foo_module modules/mod_foo.so
  133. #
  134. LoadModule access_module modules/mod_access.so
  135. LoadModule actions_module modules/mod_actions.so
  136. LoadModule alias_module modules/mod_alias.so
  137. LoadModule asis_module modules/mod_asis.so
  138. LoadModule auth_module modules/mod_auth.so
  139. #LoadModule auth_anon_module modules/mod_auth_anon.so
  140. #LoadModule auth_dbm_module modules/mod_auth_dbm.so
  141. #LoadModule auth_digest_module modules/mod_auth_digest.so
  142. LoadModule autoindex_module modules/mod_autoindex.so
  143. #LoadModule cern_meta_module modules/mod_cern_meta.so
  144. LoadModule cgi_module modules/mod_cgi.so
  145. #LoadModule dav_module modules/mod_dav.so
  146. #LoadModule dav_fs_module modules/mod_dav_fs.so
  147. LoadModule dir_module modules/mod_dir.so
  148. LoadModule env_module modules/mod_env.so
  149. #LoadModule expires_module modules/mod_expires.so
  150. #LoadModule file_cache_module modules/mod_file_cache.so
  151. #LoadModule headers_module modules/mod_headers.so
  152. LoadModule imap_module modules/mod_imap.so
  153. LoadModule include_module modules/mod_include.so
  154. #LoadModule info_module modules/mod_info.so
  155. LoadModule isapi_module modules/mod_isapi.so
  156. LoadModule log_config_module modules/mod_log_config.so
  157. LoadModule mime_module modules/mod_mime.so
  158. #LoadModule mime_magic_module modules/mod_mime_magic.so
  159. #LoadModule proxy_module modules/mod_proxy.so
  160. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  161. #LoadModule proxy_http_module modules/mod_proxy_http.so
  162. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  163. LoadModule negotiation_module modules/mod_negotiation.so
  164. #LoadModule rewrite_module modules/mod_rewrite.so
  165. LoadModule setenvif_module modules/mod_setenvif.so
  166. #LoadModule speling_module modules/mod_speling.so
  167. #LoadModule status_module modules/mod_status.so
  168. #LoadModule unique_id_module modules/mod_unique_id.so
  169. LoadModule userdir_module modules/mod_userdir.so
  170. #LoadModule usertrack_module modules/mod_usertrack.so
  171. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
  172. #LoadModule ssl_module modules/mod_ssl.so
  173.  
  174. <IfModule mime_module>
  175.  
  176. AddHandler cgi-script .cgi .pl
  177.  
  178. AddType text/html .shtml
  179. AddOutputFilter INCLUDES .shtml
  180.  
  181. </IfModule>
  182.  
  183. #
  184. # ExtendedStatus controls whether Apache will generate "full" status
  185. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  186. # Off) when the "server-status" handler is called. The default is Off.
  187. #
  188. #ExtendedStatus On
  189.  
  190. ### Section 2: 'Main' server configuration
  191. #
  192. # The directives in this section set up the values used by the 'main'
  193. # server, which responds to any requests that aren't handled by a
  194. # <VirtualHost> definition.  These values also provide defaults for
  195. # any <VirtualHost> containers you may define later in the file.
  196. #
  197. # All of these directives may appear inside <VirtualHost> containers,
  198. # in which case these default settings will be overridden for the
  199. # virtual host being defined.
  200. #
  201.  
  202. #
  203. # ServerAdmin: Your address, where problems with the server should be
  204. # e-mailed.  This address appears on some server-generated pages, such
  205. # as error documents.  e.g. admin@your-domain.com
  206. #
  207. ServerAdmin admin@sisodomain.com
  208.  
  209. #
  210. # ServerName gives the name and port that the server uses to identify itself.
  211. # This can often be determined automatically, but we recommend you specify
  212. # it explicitly to prevent problems during startup.
  213. #
  214. # If this is not set to valid DNS name for your host, server-generated
  215. # redirections will not work.  See also the UseCanonicalName directive.
  216. #
  217. # If your host doesn't have a registered DNS name, enter its IP address here.
  218. # You will have to access it by its address anyway, and this will make 
  219. # redirections work in a sensible way.
  220. #
  221. ServerName parashard.sisodomain.com:80
  222.  
  223. #
  224. # UseCanonicalName: Determines how Apache constructs self-referencing 
  225. # URLs and the SERVER_NAME and SERVER_PORT variables.
  226. # When set "Off", Apache will use the Hostname and Port supplied
  227. # by the client.  When set "On", Apache will use the value of the
  228. # ServerName directive.
  229. #
  230. UseCanonicalName Off
  231.  
  232. #
  233. # DocumentRoot: The directory out of which you will serve your
  234. # documents. By default, all requests are taken from this directory, but
  235. # symbolic links and aliases may be used to point to other locations.
  236. #
  237. DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
  238.  
  239. #
  240. # Each directory to which Apache has access can be configured with respect
  241. # to which services and features are allowed and/or disabled in that
  242. # directory (and its subdirectories). 
  243. #
  244. # First, we configure the "default" to be a very restrictive set of 
  245. # features.  
  246. #
  247. <Directory />
  248.     Options FollowSymLinks +ExecCGI 
  249.     AllowOverride None
  250. </Directory>
  251.  
  252. #
  253. # Note that from this point forward you must specifically allow
  254. # particular features to be enabled - so if something's not working as
  255. # you might expect, make sure that you have specifically enabled it
  256. # below.
  257. #
  258.  
  259. #
  260. # This should be changed to whatever you set DocumentRoot to.
  261. #
  262. <Directory "C:/Program Files/Apache Group/Apache2/htdocs">
  263.  
  264. #Options Indexes FollowSymLinks +IncludesNOEXEC
  265.  
  266. #Options +Includes +ExecCGI
  267.  
  268.  
  269. #
  270. # Possible values for the Options directive are "None", "All",
  271. # or any combination of:
  272. #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  273. #
  274. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  275. # doesn't give it to you.
  276. #
  277. # The Options directive is both complicated and important.  Please see
  278. core - Apache HTTP Server
  279. # for more information.
  280. #
  281.     Options Indexes FollowSymLinks
  282.  
  283. #
  284. # AllowOverride controls what directives may be placed in .htaccess files.
  285. # It can be "All", "None", or any combination of the keywords:
  286. #   Options FileInfo AuthConfig Limit
  287. #
  288.     AllowOverride All
  289.  
  290. #
  291. # Controls who can get stuff from this server.
  292. #
  293.     Order allow,deny
  294.     Allow from all
  295.  
  296. </Directory>
  297.  
  298. #
  299. # UserDir: The name of the directory that is appended onto a user's home
  300. # directory if a ~user request is received.  Be especially careful to use
  301. # proper, forward slashes here.  On Windows NT, "Personal/My Website"
  302. # is a more appropriate choice.
  303. #
  304. UserDir "My Documents/My Website"
  305.  
  306. #
  307. # Control access to UserDir directories.  The following is an example
  308. # for a site where these directories are restricted to read-only.
  309. #
  310. # You must correct the path for the root to match your system's configured
  311. # user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website"
  312. # or whichever, as appropriate.
  313. #
  314. #<Directory "C:/Documents and Settings/*/My Documents/My Website">
  315. #    AllowOverride FileInfo AuthConfig Limit
  316. #    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  317. #    <Limit GET POST OPTIONS PROPFIND>
  318. #        Order allow,deny
  319. #        Allow from all
  320. #    </Limit>
  321. #    <LimitExcept GET POST OPTIONS PROPFIND>
  322. #        Order deny,allow
  323. #        Deny from all
  324. #    </LimitExcept>
  325. #</Directory>
  326.  
  327. #
  328. # DirectoryIndex: sets the file that Apache will serve if a directory
  329. # is requested.
  330. #
  331. # The index.html.var file (a type-map) is used to deliver content-
  332. # negotiated documents.  The MultiViews Option can be used for the 
  333. # same purpose, but it is much slower.
  334. #
  335. DirectoryIndex index.cgi index.html index.html.var
  336.  
  337. #
  338. # AccessFileName: The name of the file to look for in each directory
  339. # for additional configuration directives.  See also the AllowOverride 
  340. # directive.
  341. #
  342. AccessFileName .htaccess
  343.  
  344. #
  345. # The following lines prevent .htaccess and .htpasswd files from being 
  346. # viewed by Web clients. 
  347. #
  348. <FilesMatch "^\.ht">
  349.     Order allow,deny
  350.     Deny from all
  351. </FilesMatch>
  352.  
  353. #
  354. # TypesConfig describes where the mime.types file (or equivalent) is
  355. # to be found.
  356. #
  357. TypesConfig conf/mime.types
  358.  
  359. #
  360. # DefaultType is the default MIME type the server will use for a document
  361. # if it cannot otherwise determine one, such as from filename extensions.
  362. # If your server contains mostly text or HTML documents, "text/plain" is
  363. # a good value.  If most of your content is binary, such as applications
  364. # or images, you may want to use "application/octet-stream" instead to
  365. # keep browsers from trying to display binary files as though they are
  366. # text.
  367. #
  368. DefaultType text/plain
  369.  
  370. #
  371. # The mod_mime_magic module allows the server to use various hints from the
  372. # contents of the file itself to determine its type.  The MIMEMagicFile
  373. # directive tells the module where the hint definitions are located.
  374. #
  375. <IfModule mod_mime_magic.c>
  376.     MIMEMagicFile conf/magic
  377. </IfModule>
  378.  
  379. #
  380. # HostnameLookups: Log the names of clients or just their IP addresses
  381. # e.g., Welcome! - The Apache Software Foundation (on) or 204.62.129.132 (off).
  382. # The default is off because it'd be overall better for the net if people
  383. # had to knowingly turn this feature on, since enabling it means that
  384. # each client request will result in AT LEAST one lookup request to the
  385. # nameserver.
  386. #
  387. HostnameLookups Off
  388.  
  389. #
  390. # EnableMMAP: Control whether memory-mapping is used to deliver
  391. # files (assuming that the underlying OS supports it).
  392. # The default is on; turn this off if you serve from NFS-mounted 
  393. # filesystems.  On some systems, turning it off (regardless of
  394. # filesystem) can improve performance; for details, please see
  395. core - Apache HTTP Server
  396. #
  397. #EnableMMAP off
  398.  
  399. #
  400. # EnableSendfile: Control whether the sendfile kernel support is 
  401. # used  to deliver files (assuming that the OS supports it).
  402. # The default is on; turn this off if you serve from NFS-mounted 
  403. # filesystems.  Please see
  404. core - Apache HTTP Server
  405. #
  406. #EnableSendfile off
  407.  
  408. #
  409. # ErrorLog: The location of the error log file.
  410. # If you do not specify an ErrorLog directive within a <VirtualHost>
  411. # container, error messages relating to that virtual host will be
  412. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  413. # container, that host's errors will be logged there and not here.
  414. #
  415. ErrorLog logs/error.log
  416.  
  417. #
  418. # LogLevel: Control the number of messages logged to the error.log.
  419. # Possible values include: debug, info, notice, warn, error, crit,
  420. # alert, emerg.
  421. #
  422. LogLevel warn
  423.  
  424. #
  425. # The following directives define some format nicknames for use with
  426. # a CustomLog directive (see below).
  427. #
  428. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  429. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  430. LogFormat "%{Referer}i -> %U" referer
  431. LogFormat "%{User-agent}i" agent
  432.  
  433. # You need to enable mod_logio.c to use %I and %O
  434. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  435.  
  436. #
  437. # The location and format of the access logfile (Common Logfile Format).
  438. # If you do not define any access logfiles within a <VirtualHost>
  439. # container, they will be logged here.  Contrariwise, if you *do*
  440. # define per-<VirtualHost> access logfiles, transactions will be
  441. # logged therein and *not* in this file.
  442. #
  443. CustomLog logs/access.log common
  444.  
  445. #
  446. # If you would like to have agent and referer logfiles, uncomment the
  447. # following directives.
  448. #
  449. #CustomLog logs/referer.log referer
  450. #CustomLog logs/agent.log agent
  451.  
  452. #
  453. # If you prefer a single logfile with access, agent, and referer information
  454. # (Combined Logfile Format) you can use the following directive.
  455. #
  456. #CustomLog logs/access.log combined
  457.  
  458. #
  459. # ServerTokens
  460. # This directive configures what you return as the Server HTTP response
  461. # Header. The default is 'Full' which sends information about the OS-Type
  462. # and compiled in modules.
  463. # Set to one of:  Full | OS | Minor | Minimal | Major | Prod
  464. # where Full conveys the most information, and Prod the least.
  465. #
  466. ServerTokens Full
  467.  
  468. #
  469. # Optionally add a line containing the server version and virtual host
  470. # name to server-generated pages (internal error documents, FTP directory 
  471. # listings, mod_status and mod_info output etc., but not CGI generated 
  472. # documents or custom error documents).
  473. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  474. # Set to one of:  On | Off | EMail
  475. #
  476. ServerSignature On
  477.  
  478. #
  479. # Aliases: Add here as many aliases as you need (with no limit). The format is 
  480. # Alias fakename realname
  481. #
  482. # Note that if you include a trailing / on fakename then the server will
  483. # require it to be present in the URL.  So "/icons" isn't aliased in this
  484. # example, only "/icons/".  If the fakename is slash-terminated, then the 
  485. # realname must also be slash terminated, and if the fakename omits the 
  486. # trailing slash, the realname must also omit it.
  487. #
  488. # We include the /icons/ alias for FancyIndexed directory listings.  If you
  489. # do not use FancyIndexing, you may comment this out.
  490. #
  491. Alias /icons/ "C:/Program Files/Apache Group/Apache2/icons/"
  492.  
  493. <Directory "C:/Program Files/Apache Group/Apache2/icons">
  494.     Options Indexes MultiViews
  495.     AllowOverride None
  496.     Order allow,deny
  497.     Allow from all
  498. </Directory>
  499.  
  500. #
  501. # This should be changed to the ServerRoot/manual/.  The alias provides
  502. # the manual, even if you choose to move your DocumentRoot.  You may comment
  503. # this out if you do not care for the documentation.
  504. #
  505. AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "C:/Program Files/Apache Group/Apache2/manual$1"
  506.  
  507. <Directory "C:/Program Files/Apache Group/Apache2/manual">
  508.     Options Indexes
  509.     AllowOverride None
  510.     Order allow,deny
  511.     Allow from all
  512.  
  513.     <Files *.html>
  514.         SetHandler type-map
  515.     </Files>
  516.  
  517.     SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
  518.     RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
  519. </Directory>
  520.  
  521. #
  522. # ScriptAlias: This controls which directories contain server scripts.
  523. # ScriptAliases are essentially the same as Aliases, except that
  524. # documents in the realname directory are treated as applications and
  525. # run by the server when requested rather than as documents sent to the client.
  526. # The same rules about trailing "/" apply to ScriptAlias directives as to
  527. # Alias.
  528. #
  529. ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
  530.  
  531. #
  532. # "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
  533. # CGI directory exists, if you have that configured.
  534. #
  535. <Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
  536.     AllowOverride Options
  537.     Options +ExecCGI
  538.     Order allow,deny
  539.     Allow from all
  540. </Directory>
  541.  
  542. #
  543. # Redirect allows you to tell clients about documents which used to exist in
  544. # your server's namespace, but do not anymore. This allows you to tell the
  545. # clients where to look for the relocated document.
  546. # Example:
  547. # Redirect permanent /foo http://www.example.com/bar
  548.  
  549. #
  550. # Directives controlling the display of server-generated directory listings.
  551. #
  552.  
  553. #
  554. # IndexOptions: Controls the appearance of server-generated directory
  555. # listings.
  556. #
  557. IndexOptions FancyIndexing VersionSort
  558.  
  559. #
  560. # AddIcon* directives tell the server which icon to show for different
  561. # files or filename extensions.  These are only displayed for
  562. # FancyIndexed directories.
  563. #
  564. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  565.  
  566. AddIconByType (TXT,/icons/text.gif) text/*
  567. AddIconByType (IMG,/icons/image2.gif) image/*
  568. AddIconByType (SND,/icons/sound2.gif) audio/*
  569. AddIconByType (VID,/icons/movie.gif) video/*
  570.  
  571. AddIcon /icons/binary.gif .bin .exe
  572. AddIcon /icons/binhex.gif .hqx
  573. AddIcon /icons/tar.gif .tar
  574. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  575. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  576. AddIcon /icons/a.gif .ps .ai .eps
  577. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  578. AddIcon /icons/text.gif .txt
  579. AddIcon /icons/c.gif .c
  580. AddIcon /icons/p.gif .pl .py
  581. AddIcon /icons/f.gif .for
  582. AddIcon /icons/dvi.gif .dvi
  583. AddIcon /icons/uuencoded.gif .uu
  584. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  585. AddIcon /icons/tex.gif .tex
  586. AddIcon /icons/bomb.gif core
  587.  
  588. AddIcon /icons/back.gif ..
  589. AddIcon /icons/hand.right.gif README
  590. AddIcon /icons/folder.gif ^^DIRECTORY^^
  591. AddIcon /icons/blank.gif ^^BLANKICON^^
  592.  
  593. #
  594. # DefaultIcon is which icon to show for files which do not have an icon
  595. # explicitly set.
  596. #
  597. DefaultIcon /icons/unknown.gif
  598.  
  599. #
  600. # AddDescription allows you to place a short description after a file in
  601. # server-generated indexes.  These are only displayed for FancyIndexed
  602. # directories.
  603. # Format: AddDescription "description" filename
  604. #
  605. #AddDescription "GZIP compressed document" .gz
  606. #AddDescription "tar archive" .tar
  607. #AddDescription "GZIP compressed tar archive" .tgz
  608.  
  609. #
  610. # ReadmeName is the name of the README file the server will look for by
  611. # default, and append to directory listings.
  612. #
  613. # HeaderName is the name of a file which should be prepended to
  614. # directory indexes. 
  615. ReadmeName README.html
  616. HeaderName HEADER.html
  617.  
  618. #
  619. # IndexIgnore is a set of filenames which directory indexing should ignore
  620. # and not include in the listing.  Shell-style wildcarding is permitted.
  621. #
  622. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  623.  
  624. #
  625. # DefaultLanguage and AddLanguage allows you to specify the language of 
  626. # a document. You can then use content negotiation to give a browser a 
  627. # file in a language the user can understand.
  628. #
  629. # Specify a default language. This means that all data
  630. # going out without a specific language tag (see below) will 
  631. # be marked with this one. You probably do NOT want to set
  632. # this unless you are sure it is correct for all cases.
  633. #
  634. # * It is generally better to not mark a page as 
  635. # * being a certain language than marking it with the wrong
  636. # * language!
  637. #
  638. # DefaultLanguage nl
  639. #
  640. # Note 1: The suffix does not have to be the same as the language
  641. # keyword --- those with documents in Polish (whose net-standard
  642. # language code is pl) may wish to use "AddLanguage pl .po" to
  643. # avoid the ambiguity with the common suffix for perl scripts.
  644. #
  645. # Note 2: The example entries below illustrate that in some cases 
  646. # the two character 'Language' abbreviation is not identical to 
  647. # the two character 'Country' code for its country,
  648. # E.g. 'Danmark/dk' versus 'Danish/da'.
  649. #
  650. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  651. # specifier. There is 'work in progress' to fix this and get
  652. # the reference data for rfc1766 cleaned up.
  653. #
  654. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  655. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  656. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  657. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  658. # Norwegian (no) - Polish (pl) - Portugese (pt)
  659. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  660. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  661. #
  662. AddLanguage ca .ca
  663. AddLanguage cs .cz .cs
  664. AddLanguage da .dk
  665. AddLanguage de .de
  666. AddLanguage el .el
  667. AddLanguage en .en
  668. AddLanguage eo .eo
  669. AddLanguage es .es
  670. AddLanguage et .et
  671. AddLanguage fr .fr
  672. AddLanguage he .he
  673. AddLanguage hr .hr
  674. AddLanguage it .it
  675. AddLanguage ja .ja
  676. AddLanguage ko .ko
  677. AddLanguage ltz .ltz
  678. AddLanguage nl .nl
  679. AddLanguage nn .nn
  680. AddLanguage no .no
  681. AddLanguage pl .po
  682. AddLanguage pt .pt
  683. AddLanguage pt-BR .pt-br
  684. AddLanguage ru .ru
  685. AddLanguage sv .sv
  686. AddLanguage zh-CN .zh-cn
  687. AddLanguage zh-TW .zh-tw
  688.  
  689. #
  690. # LanguagePriority allows you to give precedence to some languages
  691. # in case of a tie during content negotiation.
  692. #
  693. # Just list the languages in decreasing order of preference. We have
  694. # more or less alphabetized them here. You probably want to change this.
  695. #
  696. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
  697.  
  698. #
  699. # ForceLanguagePriority allows you to serve a result page rather than
  700. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  701. # [in case no accepted languages matched the available variants]
  702. #
  703. ForceLanguagePriority Prefer Fallback
  704.  
  705. #
  706. # Commonly used filename extensions to character sets. You probably
  707. # want to avoid clashes with the language extensions, unless you
  708. # are good at carefully testing your setup after each change.
  709. # See http://www.iana.org/assignments/character-sets for the
  710. # official list of charset names and their respective RFCs.
  711. #
  712. AddCharset ISO-8859-1  .iso8859-1 .latin1
  713. AddCharset ISO-8859-2  .iso8859-2 .latin2 .cen
  714. AddCharset ISO-8859-3  .iso8859-3 .latin3
  715. AddCharset ISO-8859-4  .iso8859-4 .latin4
  716. AddCharset ISO-8859-5  .iso8859-5 .latin5 .cyr .iso-ru
  717. AddCharset ISO-8859-6  .iso8859-6 .latin6 .arb
  718. AddCharset ISO-8859-7  .iso8859-7 .latin7 .grk
  719. AddCharset ISO-8859-8  .iso8859-8 .latin8 .heb
  720. AddCharset ISO-8859-9  .iso8859-9 .latin9 .trk
  721. AddCharset ISO-2022-JP .iso2022-jp .jis
  722. AddCharset ISO-2022-KR .iso2022-kr .kis
  723. AddCharset ISO-2022-CN .iso2022-cn .cis
  724. AddCharset Big5        .Big5       .big5
  725. # For russian, more than one charset is used (depends on client, mostly):
  726. AddCharset WINDOWS-1251 .cp-1251   .win-1251
  727. AddCharset CP866       .cp866
  728. AddCharset KOI8-r      .koi8-r .koi8-ru
  729. AddCharset KOI8-ru     .koi8-uk .ua
  730. AddCharset ISO-10646-UCS-2 .ucs2
  731. AddCharset ISO-10646-UCS-4 .ucs4
  732. AddCharset UTF-8       .utf8
  733.  
  734. # The set below does not map to a specific (iso) standard
  735. # but works on a fairly wide range of browsers. Note that
  736. # capitalization actually matters (it should not, but it
  737. # does for some browsers).
  738. #
  739. # See http://www.iana.org/assignments/character-sets
  740. # for a list of sorts. But browsers support few.
  741. #
  742. AddCharset GB2312      .gb2312 .gb 
  743. AddCharset utf-7       .utf7
  744. AddCharset utf-8       .utf8
  745. AddCharset big5        .big5 .b5
  746. AddCharset EUC-TW      .euc-tw
  747. AddCharset EUC-JP      .euc-jp
  748. AddCharset EUC-KR      .euc-kr
  749. AddCharset shift_jis   .sjis
  750.  
  751. #
  752. # AddType allows you to add to or override the MIME configuration
  753. # file mime.types for specific file types.
  754. #
  755. #AddType application/x-tar .tgz
  756. #
  757. # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
  758. # information on the fly. Note: Not all browsers support this.
  759. # Despite the name similarity, the following Add* directives have nothing
  760. # to do with the FancyIndexing customization directives above.
  761. #
  762. #AddEncoding x-compress .Z
  763. #AddEncoding x-gzip .gz .tgz
  764. #
  765. # If the AddEncoding directives above are commented-out, then you
  766. # probably should define those extensions to indicate media types:
  767. #
  768. AddType application/x-compress .Z
  769. AddType application/x-gzip .gz .tgz
  770.  
  771. #
  772. # AddHandler allows you to map certain file extensions to "handlers":
  773. # actions unrelated to filetype. These can be either built into the server
  774. # or added with the Action directive (see below)
  775. #
  776. # To use CGI scripts outside of ScriptAliased directories:
  777. # (You will also need to add "ExecCGI" to the "Options" directive.)
  778. #
  779. #AddHandler cgi-script .cgi
  780.  
  781. #
  782. # For files that include their own HTTP headers:
  783. #
  784. #AddHandler send-as-is asis
  785.  
  786. #
  787. # For server-parsed imagemap files:
  788. #
  789. #AddHandler imap-file map
  790.  
  791. #
  792. # For type maps (negotiated resources):
  793. # (This is enabled by default to allow the Apache "It Worked" page
  794. #  to be distributed in multiple languages.)
  795. #
  796. AddHandler type-map var
  797.  
  798. #
  799. # Filters allow you to process content before it is sent to the client.
  800. #
  801. # To parse .shtml files for server-side includes (SSI):
  802. # (You will also need to add "Includes" to the "Options" directive.)
  803. #
  804. #AddType text/html .shtml
  805. #AddOutputFilter INCLUDES .shtml
  806.  
  807. #
  808. # Action lets you define media types that will execute a script whenever
  809. # a matching file is called. This eliminates the need for repeated URL
  810. # pathnames for oft-used CGI file processors.
  811. # Format: Action media/type /cgi-script/location
  812. # Format: Action handler-name /cgi-script/location
  813. #
  814.  
  815. #
  816. # Customizable error responses come in three flavors:
  817. # 1) plain text 2) local redirects 3) external redirects
  818. #
  819. # Some examples:
  820. #ErrorDocument 500 "The server made a boo boo."
  821. #ErrorDocument 404 /missing.html
  822. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  823. #ErrorDocument 402 http://www.example.com/subscription_info.html
  824. #
  825.  
  826. #
  827. # Putting this all together, we can internationalize error responses.
  828. #
  829. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  830. # our collection of by-error message multi-language collections.  We use 
  831. # includes to substitute the appropriate text.
  832. #
  833. # You can modify the messages' appearance without changing any of the
  834. # default HTTP_<error>.html.var files by adding the line:
  835. #
  836. #   Alias /error/include/ "/your/include/path/"
  837. #
  838. # which allows you to create your own set of files by starting with the
  839. # @exp_errordir@/include/ files and copying them to /your/include/path/, 
  840. # even on a per-VirtualHost basis.  The default include files will display
  841. # your Apache version number and your ServerAdmin email address regardless
  842. # of the setting of ServerSignature.
  843. #
  844. # The internationalized error documents require mod_alias, mod_include
  845. # and mod_negotiation.  To activate them, uncomment the following 30 lines.
  846.  
  847. #    Alias /error/ "@exp_errordir@/"
  848. #
  849. #    <Directory "@exp_errordir@">
  850. #        AllowOverride None
  851. #        Options IncludesNoExec
  852. #        AddOutputFilter Includes html
  853. #        AddHandler type-map var
  854. #        Order allow,deny
  855. #        Allow from all
  856. #        LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
  857. #        ForceLanguagePriority Prefer Fallback
  858. #    </Directory>
  859. #
  860. #    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  861. #    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  862. #    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  863. #    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  864. #    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  865. #    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  866. #    ErrorDocument 410 /error/HTTP_GONE.html.var
  867. #    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  868. #    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  869. #    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  870. #    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  871. #    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  872. #    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  873. #    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  874. #    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  875. #    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  876. #    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  877.  
  878.  
  879.  
  880. #
  881. # The following directives modify normal HTTP response behavior to
  882. # handle known problems with browser implementations.
  883. #
  884. BrowserMatch "Mozilla/2" nokeepalive
  885. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  886. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  887. BrowserMatch "Java/1\.0" force-response-1.0
  888. BrowserMatch "JDK/1\.0" force-response-1.0
  889.  
  890. #
  891. # The following directive disables redirects on non-GET requests for
  892. # a directory that does not include the trailing slash.  This fixes a 
  893. # problem with Microsoft WebFolders which does not appropriately handle 
  894. # redirects for folders with DAV methods.
  895. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  896. #
  897. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  898. BrowserMatch "MS FrontPage" redirect-carefully
  899. BrowserMatch "^WebDrive" redirect-carefully
  900. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  901. BrowserMatch "^gnome-vfs" redirect-carefully
  902. BrowserMatch "^XML Spy" redirect-carefully
  903. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  904.  
  905. #
  906. # Allow server status reports generated by mod_status,
  907. # with the URL of http://servername/server-status
  908. # Change the ".sisodomain.com" to match your domain to enable.
  909. #
  910. #<Location /server-status>
  911. #    SetHandler server-status
  912. #    Order deny,allow
  913. #    Deny from all
  914. #    Allow from .sisodomain.com
  915. #</Location>
  916.  
  917. #
  918. # Allow remote server configuration reports, with the URL of
  919. #  http://servername/server-info (requires that mod_info.c be loaded).
  920. # Change the ".sisodomain.com" to match your domain to enable.
  921. #
  922. #<Location /server-info>
  923. #    SetHandler server-info
  924. #    Order deny,allow
  925. #    Deny from all
  926. #    Allow from .sisodomain.com
  927. #</Location>
  928.  
  929.  
  930. #
  931. # Bring in additional module-specific configurations
  932. #
  933. <IfModule mod_ssl.c>
  934.     Include conf/ssl.conf
  935. </IfModule>
  936.  
  937.  
  938. ### Section 3: Virtual Hosts
  939. #
  940. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  941. # machine you can setup VirtualHost containers for them. Most configurations
  942. # use only name-based virtual hosts so the server doesn't need to worry about
  943. # IP addresses. This is indicated by the asterisks in the directives below.
  944. #
  945. # Please see the documentation at 
  946. # <URL:http://httpd.apache.org/docs/2.0/vhosts/>
  947. # for further details before you try to setup virtual hosts.
  948. #
  949. # You may use the command line option '-S' to verify your virtual host
  950. # configuration.
  951.  
  952. #
  953. # Use name-based virtual hosting.
  954. #
  955. #NameVirtualHost *:80
  956.  
  957. #
  958. # VirtualHost example:
  959. # Almost any Apache directive may go into a VirtualHost container.
  960. # The first VirtualHost section is used for requests without a known
  961. # server name.
  962. #
  963. #<VirtualHost *:80>
  964. #    ServerAdmin webmaster@dummy-host.example.com
  965. #    DocumentRoot /www/docs/dummy-host.example.com
  966. #    ServerName dummy-host.example.com
  967. #    ErrorLog logs/dummy-host.example.com-error_log
  968. #    CustomLog logs/dummy-host.example.com-access_log common
  969. #</VirtualHost>
Jan 5 '09 #24
numberwhun
3,509 Expert Mod 2GB
I have separated out the posts that were specifically apache and started a new thread with them here.

Regards,

Jeff
Jan 8 '09 #25
There is no reply on Apache Forum. Can anybody on Bytes please help out?
Jan 12 '09 #26
There is no reply for the thread in apache forum. Can anybody please help from here?
Jan 28 '09 #27
numberwhun
3,509 Expert Mod 2GB
@parashar123
There were plenty of replies from Icecrack, who is one of our Perl experts. Problem is, he asked for information and you never answered him. You asked about code tags, but never put your code in place that he asked for.

In any of your postings here, you will see that your code is in a box and each line numbered. If you edit that post, you will see the code tags there.

Also, I just replied to your apache posting.


Regards,

Jeff
Jan 28 '09 #28

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
7
by: Danny | last post by:
Newbie here Thanks for the help with this command: print "Status: 204 No Content\n\n"; which returns nothing in a perl script. This is great because I just want my perl script to increment a...
3
by: PzYon | last post by:
Hey 2gether! I'm trying to execute a PERL script on the web server when the user presses a button in an ASP.NET Web Application using Visual Basic. The most obvious solution for me seemed to be...
1
by: David Meier | last post by:
Hi all, I am not a very skilled C programmer yet and I need the help of the list bad. OK, here is the problem: I have written a SIEVE module coded in C for the cyrus imapd mail server. This...
7
by: Wladimir Borsov | last post by:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click...
3
by: bossingdarwin | last post by:
Hi Guys, I'm new to Perl and to this forum and I hope you gurus here help me. I am building a perl script that will telnet to one of my cisco router and execute commands. I was able to do this...
1
by: Tension | last post by:
Hi. I have a Perl script that starts a build process (plus a lot of other things). The build process needs a few environment variables set. This is done automatically in a buildEnv.bat script...
1
rajiv07
by: rajiv07 | last post by:
Hi to All, I have try to execute a perl script in html.But nothing get display What i have tried so for is The referrer.pl --------------- #!/usr/bin/perl
1
by: chinks | last post by:
hello I hv a perl script which takes three inputs..and i want to call this script by a php file..how to do so..please help me out...i have to create a web interface
82
by: happyse27 | last post by:
Hi All, I modified the user registration script, but not sure how to make it check for each variable in terms of preventing junk registration and invalid characters? Two codes below : a)...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.