| 1 |
wakaba |
1.2 |
|
| 2 |
wakaba |
1.4 |
# |
| 3 |
|
|
# AddType allows you to tweak mime.types without actually editing it, or to |
| 4 |
|
|
# make certain files to be certain types. |
| 5 |
|
|
# |
| 6 |
|
|
# For example, the PHP 3.x module (not part of the Apache distribution - see |
| 7 |
|
|
# http://www.php.net) will typically use: |
| 8 |
|
|
# |
| 9 |
|
|
#AddType application/x-httpd-php3 .php3 |
| 10 |
|
|
#AddType application/x-httpd-php3-source .phps |
| 11 |
|
|
# |
| 12 |
|
|
# And for PHP 4.x, use: |
| 13 |
|
|
# |
| 14 |
|
|
AddType application/x-httpd-php .php |
| 15 |
|
|
AddType application/x-httpd-php-source .phps |
| 16 |
|
|
|
| 17 |
|
|
#AddType application/x-tar .tgz |
| 18 |
|
|
|
| 19 |
|
|
# |
| 20 |
|
|
# AddHandler allows you to map certain file extensions to "handlers", |
| 21 |
|
|
# actions unrelated to filetype. These can be either built into the server |
| 22 |
|
|
# or added with the Action command (see below) |
| 23 |
|
|
# |
| 24 |
|
|
# If you want to use server side includes, or CGI outside |
| 25 |
|
|
# ScriptAliased directories, uncomment the following lines. |
| 26 |
|
|
# |
| 27 |
|
|
# To use CGI scripts: |
| 28 |
|
|
# |
| 29 |
|
|
AddHandler cgi-script .cgi |
| 30 |
|
|
|
| 31 |
|
|
# |
| 32 |
|
|
# To use server-parsed HTML files |
| 33 |
|
|
# |
| 34 |
|
|
#AddType text/html .shtml |
| 35 |
|
|
#AddHandler server-parsed .shtml |
| 36 |
|
|
|
| 37 |
|
|
# |
| 38 |
|
|
# Uncomment the following line to enable Apache's send-asis HTTP file |
| 39 |
|
|
# feature |
| 40 |
|
|
# |
| 41 |
|
|
#AddHandler send-as-is asis |
| 42 |
|
|
|
| 43 |
|
|
# |
| 44 |
|
|
# If you wish to use server-parsed imagemap files, use |
| 45 |
|
|
# |
| 46 |
|
|
#AddHandler imap-file map |
| 47 |
|
|
|
| 48 |
|
|
# |
| 49 |
|
|
# To enable type maps, you might want to use |
| 50 |
|
|
# |
| 51 |
|
|
#AddHandler type-map var |
| 52 |
|
|
|
| 53 |
|
|
</IfModule> |
| 54 |
|
|
|
| 55 |
|
|
<IfModule mod_headers.c> |
| 56 |
|
|
Header set Content-Style-Type text/css |
| 57 |
|
|
Header set Content-Script-Type text/javascript |
| 58 |
|
|
</IfModule> |
| 59 |
|
|
|
| 60 |
|
|
# End of document types. |
| 61 |
|
|
|
| 62 |
|
|
# |
| 63 |
|
|
# Action lets you define media types that will execute a script whenever |
| 64 |
|
|
# a matching file is called. This eliminates the need for repeated URL |
| 65 |
|
|
# pathnames for oft-used CGI file processors. |
| 66 |
|
|
# Format: Action media/type /cgi-script/location |
| 67 |
|
|
# Format: Action handler-name /cgi-script/location |
| 68 |
|
|
# |
| 69 |
|
|
|
| 70 |
|
|
# |
| 71 |
|
|
# MetaDir: specifies the name of the directory in which Apache can find |
| 72 |
|
|
# meta information files. These files contain additional HTTP headers |
| 73 |
|
|
# to include when sending the document |
| 74 |
|
|
# |
| 75 |
|
|
#MetaDir .web |
| 76 |
|
|
|
| 77 |
|
|
# |
| 78 |
|
|
# MetaSuffix: specifies the file name suffix for the file containing the |
| 79 |
|
|
# meta information. |
| 80 |
|
|
# |
| 81 |
|
|
#MetaSuffix .meta |
| 82 |
|
|
|
| 83 |
|
|
# |
| 84 |
|
|
# Customizable error response (Apache style) |
| 85 |
|
|
# these come in three flavors |
| 86 |
|
|
# |
| 87 |
|
|
# 1) plain text |
| 88 |
|
|
#ErrorDocument 500 "The server made a boo boo. |
| 89 |
|
|
# n.b. the single leading (") marks it as text, it does not get output |
| 90 |
|
|
# |
| 91 |
|
|
# 2) local redirects |
| 92 |
|
|
#ErrorDocument 404 /missing.html |
| 93 |
|
|
# to redirect to local URL /missing.html |
| 94 |
|
|
#ErrorDocument 404 /cgi-bin/missing_handler.pl |
| 95 |
|
|
# N.B.: You can redirect to a script or a document using server-side-includes. |
| 96 |
|
|
# |
| 97 |
|
|
# 3) external redirects |
| 98 |
|
|
#ErrorDocument 402 http://some.other_server.com/subscription_info.html |
| 99 |
|
|
# N.B.: Many of the environment variables associated with the original |
| 100 |
|
|
# request will *not* be available to such a script. |
| 101 |
|
|
|
| 102 |
wakaba |
1.2 |
ErrorDocument 401 /error/401 |
| 103 |
|
|
ErrorDocument 403 /error/403 |
| 104 |
|
|
ErrorDocument 404 /error/404 |
| 105 |
|
|
ErrorDocument 500 /error/500 |
| 106 |
|
|
|
| 107 |
|
|
|
| 108 |
|
|
# |
| 109 |
|
|
# Customize behaviour based on the browser |
| 110 |
|
|
# |
| 111 |
|
|
<IfModule mod_setenvif.c> |
| 112 |
|
|
|
| 113 |
|
|
SetEnv LANG ja_JP.eucJP |
| 114 |
|
|
|
| 115 |
|
|
# |
| 116 |
|
|
# The following directives modify normal HTTP response behavior. |
| 117 |
|
|
# The first directive disables keepalive for Netscape 2.x and browsers that |
| 118 |
|
|
# spoof it. There are known problems with these browser implementations. |
| 119 |
|
|
# The second directive is for Microsoft Internet Explorer 4.0b2 |
| 120 |
|
|
# which has a broken HTTP/1.1 implementation and does not properly |
| 121 |
|
|
# support keepalive when it is used on 301 or 302 (redirect) responses. |
| 122 |
|
|
# |
| 123 |
|
|
BrowserMatch "Mozilla/2" nokeepalive |
| 124 |
|
|
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 |
| 125 |
|
|
|
| 126 |
|
|
# |
| 127 |
|
|
# The following directive disables HTTP/1.1 responses to browsers which |
| 128 |
|
|
# are in violation of the HTTP/1.0 spec by not being able to grok a |
| 129 |
|
|
# basic 1.1 response. |
| 130 |
|
|
# |
| 131 |
|
|
BrowserMatch "RealPlayer 4\.0" force-response-1.0 |
| 132 |
|
|
BrowserMatch "Java/1\.0" force-response-1.0 |
| 133 |
|
|
BrowserMatch "JDK/1\.0" force-response-1.0 |
| 134 |
|
|
|
| 135 |
|
|
</IfModule> |
| 136 |
|
|
# End of browser customization directives |
| 137 |
|
|
|
| 138 |
|
|
# |
| 139 |
|
|
# Allow server status reports, with the URL of http://servername/server-status |
| 140 |
|
|
# Change the ".your_domain.com" to match your domain to enable. |
| 141 |
|
|
# |
| 142 |
|
|
<Location "/admin/web.ad/status"> |
| 143 |
|
|
SetHandler server-status |
| 144 |
|
|
</Location> |
| 145 |
|
|
|
| 146 |
|
|
# |
| 147 |
|
|
# Allow remote server configuration reports, with the URL of |
| 148 |
|
|
# http://servername/server-info (requires that mod_info.c be loaded). |
| 149 |
|
|
# Change the ".your_domain.com" to match your domain to enable. |
| 150 |
|
|
# |
| 151 |
|
|
#<Location "/admin/web.ad/info"> |
| 152 |
|
|
# SetHandler server-info |
| 153 |
|
|
# Order deny,allow |
| 154 |
|
|
# Deny from all |
| 155 |
|
|
# Allow from .your_domain.com |
| 156 |
|
|
#</Location> |
| 157 |
|
|
|
| 158 |
|
|
<IfModule mod_perl.c> |
| 159 |
|
|
<Location /admin/web.ad/perl-status> |
| 160 |
|
|
SetHandler perl-script |
| 161 |
|
|
PerlHandler Apache::Status |
| 162 |
|
|
</Location> |
| 163 |
|
|
</IfModule> |
| 164 |
|
|
|
| 165 |
|
|
|
| 166 |
|
|
|
| 167 |
|
|
# |
| 168 |
|
|
# There have been reports of people trying to abuse an old bug from pre-1.1 |
| 169 |
|
|
# days. This bug involved a CGI script distributed as a part of Apache. |
| 170 |
|
|
# By uncommenting these lines you can redirect these attacks to a logging |
| 171 |
|
|
# script on phf.apache.org. Or, you can record them yourself, using the script |
| 172 |
|
|
# support/phf_abuse_log.cgi. |
| 173 |
|
|
# |
| 174 |
|
|
#<Location /cgi-bin/phf*> |
| 175 |
|
|
# Deny from all |
| 176 |
|
|
# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi |
| 177 |
|
|
#</Location> |
| 178 |
|
|
|
| 179 |
|
|
# |
| 180 |
|
|
# Proxy Server directives. Uncomment the following lines to |
| 181 |
|
|
# enable the proxy server: |
| 182 |
|
|
# |
| 183 |
|
|
#<IfModule mod_proxy.c> |
| 184 |
|
|
# ProxyRequests On |
| 185 |
|
|
|
| 186 |
|
|
# <Directory proxy:*> |
| 187 |
|
|
# Order deny,allow |
| 188 |
|
|
# Deny from all |
| 189 |
|
|
# Allow from .your_domain.com |
| 190 |
|
|
# </Directory> |
| 191 |
|
|
|
| 192 |
|
|
# |
| 193 |
|
|
# Enable/disable the handling of HTTP/1.1 "Via:" headers. |
| 194 |
|
|
# ("Full" adds the server version; "Block" removes all outgoing Via: headers) |
| 195 |
|
|
# Set to one of: Off | On | Full | Block |
| 196 |
|
|
# |
| 197 |
|
|
# ProxyVia On |
| 198 |
|
|
|
| 199 |
|
|
# |
| 200 |
|
|
# To enable the cache as well, edit and uncomment the following lines: |
| 201 |
|
|
# (no cacheing without CacheRoot) |
| 202 |
|
|
# |
| 203 |
|
|
# CacheRoot "/usr/local/apache/proxy" |
| 204 |
|
|
# CacheSize 5 |
| 205 |
|
|
# CacheGcInterval 4 |
| 206 |
|
|
# CacheMaxExpire 24 |
| 207 |
|
|
# CacheLastModifiedFactor 0.1 |
| 208 |
|
|
# CacheDefaultExpire 1 |
| 209 |
|
|
# NoCache a_domain.com another_domain.edu joes.garage_sale.com |
| 210 |
|
|
|
| 211 |
|
|
#</IfModule> |
| 212 |
|
|
# End of proxy directives. |
| 213 |
|
|
|
| 214 |
|
|
### Section 3: Virtual Hosts |
| 215 |
|
|
# |
| 216 |
|
|
# VirtualHost: If you want to maintain multiple domains/hostnames on your |
| 217 |
|
|
# machine you can setup VirtualHost containers for them. Most configurations |
| 218 |
|
|
# use only name-based virtual hosts so the server doesn't need to worry about |
| 219 |
|
|
# IP addresses. This is indicated by the asterisks in the directives below. |
| 220 |
|
|
# |
| 221 |
|
|
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/> |
| 222 |
|
|
# for further details before you try to setup virtual hosts. |
| 223 |
|
|
# |
| 224 |
|
|
# You may use the command line option '-S' to verify your virtual host |
| 225 |
|
|
# configuration. |
| 226 |
|
|
|
| 227 |
|
|
# |
| 228 |
|
|
# Use name-based virtual hosting. |
| 229 |
|
|
# |
| 230 |
|
|
#NameVirtualHost * |
| 231 |
|
|
|
| 232 |
|
|
# |
| 233 |
|
|
# VirtualHost example: |
| 234 |
|
|
# Almost any Apache directive may go into a VirtualHost container. |
| 235 |
|
|
# The first VirtualHost section is used for requests without a known |
| 236 |
|
|
# server name. |
| 237 |
|
|
# |
| 238 |
|
|
#<VirtualHost *> |
| 239 |
|
|
# ServerAdmin webmaster@dummy-host.example.com |
| 240 |
wakaba |
1.1 |
# DocumentRoot /www/docs/dummy-host.example.com |
| 241 |
|
|
# ServerName dummy-host.example.com |
| 242 |
|
|
# ErrorLog logs/dummy-host.example.com-error_log |
| 243 |
|
|
# CustomLog logs/dummy-host.example.com-access_log common |
| 244 |
|
|
#</VirtualHost> |
| 245 |
|
|
|
| 246 |
|
|
## apache/conf/httpd.conf ends here. |