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