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.
43 ServerAlias webbie.ndawn.com
46 RewriteCond %{HTTPS} !=on
47 RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
53 ServerAlias webbie.ndawn.com
55 ErrorLog /var/log/apache2/ndawn_error_log
56 <IfModule mod_log_config.c>
57 #TransferLog logs/ndawn_access_log
58 CustomLog /var/log/apache2/ndawn_access_log "%h %l %u [%{%F %H:%M:%S}t] \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\""
61 <IfModule mod_setenvif.c>
62 SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
63 downgrade-1.0 force-response-1.0
66 # DocumentRoot: The directory out of which you will serve your
67 # documents. By default, all requests are taken from this directory, but
68 # symbolic links and aliases may be used to point to other locations.
70 DocumentRoot "/var/www/ndawn/htdocs"
72 DeflateFilterNote ratio
73 AddOutputFilterByType DEFLATE text/*
74 AddOutputFilterByType DEFLATE application/xhtml+xml
75 AddOutputFilterByType DEFLATE application/ms* application/vnd* application/postscript
79 # This should be changed to whatever you set DocumentRoot to.
81 <Directory "/var/www/ndawn/htdocs">
84 # Possible values for the Options directive are "None", "All",
85 # or any combination of:
86 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
88 # Note that "MultiViews" must be named *explicitly* --- "Options All"
89 # doesn't give it to you.
91 # The Options directive is both complicated and important. Please see
92 # http://httpd.apache.org/docs-2.0/mod/core.html#options
93 # for more information.
95 Options Indexes FollowSymLinks
98 # AllowOverride controls what directives may be placed in .htaccess files.
99 # It can be "All", "None", or any combination of the keywords:
100 # Options FileInfo AuthConfig Limit
106 AuthName "NewDawn authentication"
109 PerlAuthenHandler NDWeb::AuthHandler
117 # Disallow browsing of Subversion working copy administrative dirs.
118 <locationmatch "/.svn/>
122 <Location .*/\.svn/.*>
127 PerlSwitches -T -I/var/www/ndawn/
128 PerlRequire /var/www/ndawn/startup.pl
129 <Location ~ "^/((\w+\.(pl|php|pm))|[^.]*)$">
130 SetHandler perl-script
131 PerlResponseHandler ND
134 <Location /perl-status>
135 SetHandler perl-script
136 PerlResponseHandler Apache2::Status
140 Allow from 193.11.248.227
145 # this must match a Processor
146 ServerEnvironment apache apache
148 # these are optional - defaults to the values specified in httpd.conf