1 ### Section 3: Virtual Hosts
3 # VirtualHost: If you want to maintain multiple domains/hostnames on your
4 # machine you can setup VirtualHost containers for them. Most configurations
5 # use only name-based virtual hosts so the server doesn't need to worry about
6 # IP addresses. This is indicated by the asterisks in the directives below.
8 # Please see the documentation at
9 # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
10 # for further details before you try to setup virtual hosts.
12 # You may use the command line option '-S' to verify your virtual host
16 # Use name-based virtual hosting.
18 #NameVirtualHost guranga.org:80
21 # VirtualHost example:
22 # Almost any Apache directive may go into a VirtualHost container.
23 # The first VirtualHost section is used for requests without a known
27 # ServerAdmin webmaster@dummy-host.example.com
28 # DocumentRoot /www/docs/dummy-host.example.com
29 # ServerName dummy-host.example.com
30 # ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
31 # CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common
36 # The First Virtual Host is also your DEFAULT Virtual Host.
37 # This means any requests that do not match any other vhosts will
38 # goto this virtual host.
45 RewriteCond %{HTTPS} !=on
46 RewriteRule ^/(.*) https://%{SERVER_NAME}:1337%{REQUEST_URI} [R]
52 ErrorLog /var/log/apache2/ndawn_error_log
53 <IfModule mod_log_config.c>
54 #TransferLog logs/ndawn_access_log
55 CustomLog /var/log/apache2/ndawn_access_log "%h %l %u [%{%F %H:%M:%S}t] \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\""
58 <IfModule mod_setenvif.c>
59 SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
60 downgrade-1.0 force-response-1.0
63 # DocumentRoot: The directory out of which you will serve your
64 # documents. By default, all requests are taken from this directory, but
65 # symbolic links and aliases may be used to point to other locations.
67 DocumentRoot "/var/www/ndawn/htdocs"
69 DeflateFilterNote ratio
70 AddOutputFilterByType DEFLATE text/*
71 AddOutputFilterByType DEFLATE application/xhtml+xml
72 AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
76 # This should be changed to whatever you set DocumentRoot to.
78 <Directory "/var/www/ndawn/htdocs">
81 # Possible values for the Options directive are "None", "All",
82 # or any combination of:
83 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
85 # Note that "MultiViews" must be named *explicitly* --- "Options All"
86 # doesn't give it to you.
88 # The Options directive is both complicated and important. Please see
89 # http://httpd.apache.org/docs-2.0/mod/core.html#options
90 # for more information.
92 Options Indexes FollowSymLinks
95 # AllowOverride controls what directives may be placed in .htaccess files.
96 # It can be "All", "None", or any combination of the keywords:
97 # Options FileInfo AuthConfig Limit
103 AuthName "NewDawn authentication"
106 PerlAuthenHandler NDWeb::AuthHandler
114 # Disallow browsing of Subversion working copy administrative dirs.
115 <locationmatch "/.svn/>
119 <Location .*/\.svn/.*>
124 PerlSwitches -T -I/var/www/ndawn/
125 PerlRequire /var/www/ndawn/startup.pl
126 <Location ~ "^/((\w+\.(pl|php|pm))|[^.]*)$">
127 SetHandler perl-script
128 PerlResponseHandler ND
131 <Location /perl-status>
132 SetHandler perl-script
133 PerlResponseHandler Apache2::Status
137 Allow from 193.11.248.227
142 # this must match a Processor
143 ServerEnvironment apache apache
145 # these are optional - defaults to the values specified in httpd.conf
154 ServerName nd.ruin.nu
156 ErrorLog /var/log/apache2/ndawn_error_log
157 <IfModule mod_log_config.c>
158 #TransferLog logs/ndawn_access_log
159 CustomLog /var/log/apache2/ndawn_access_log "%h %l %u [%{%F %H:%M:%S}t] \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\""
164 SSLCertificateFile /etc/apache2/ssl/nd.crt
165 SSLCertificateKeyFile /etc/apache2/ssl/nd.key
166 #SSLCertificateChainFile /etc/apache2/ssl/ca-bundle.crt
167 #SSLCACertificateFile /etc/apache2/ssl/ca-bundle.crt
169 <IfModule setenvif_module>
170 BrowserMatch ".*MSIE.*" \
171 nokeepalive ssl-unclean-shutdown \
172 downgrade-1.0 force-response-1.0
175 # DocumentRoot: The directory out of which you will serve your
176 # documents. By default, all requests are taken from this directory, but
177 # symbolic links and aliases may be used to point to other locations.
179 DocumentRoot "/var/www/ndawn/htdocs"
181 DeflateFilterNote ratio
182 AddOutputFilterByType DEFLATE text/*
183 AddOutputFilterByType DEFLATE application/xhtml+xml
184 AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
188 # This should be changed to whatever you set DocumentRoot to.
190 <Directory "/var/www/ndawn/htdocs">
193 # Possible values for the Options directive are "None", "All",
194 # or any combination of:
195 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
197 # Note that "MultiViews" must be named *explicitly* --- "Options All"
198 # doesn't give it to you.
200 # The Options directive is both complicated and important. Please see
201 # http://httpd.apache.org/docs-2.0/mod/core.html#options
202 # for more information.
204 Options Indexes FollowSymLinks
207 # AllowOverride controls what directives may be placed in .htaccess files.
208 # It can be "All", "None", or any combination of the keywords:
209 # Options FileInfo AuthConfig Limit
215 AuthName "NewDawn authentication"
218 PerlAuthenHandler NDWeb::AuthHandler
226 # Disallow browsing of Subversion working copy administrative dirs.
227 <locationmatch "/.svn/>
231 <Location .*/\.svn/.*>
236 PerlSwitches -T -I/var/www/ndawn/
237 PerlRequire /var/www/ndawn/startup.pl
238 <Location ~ "^/((\w+\.(pl|php|pm))|[^.]*)$">
239 SetHandler perl-script
240 PerlResponseHandler ND
243 <Location /perl-status>
244 SetHandler perl-script
245 PerlResponseHandler Apache2::Status
249 Allow from 193.11.248.227
254 # this must match a Processor
255 ServerEnvironment apache apache
257 # these are optional - defaults to the values specified in httpd.conf