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