diff options
author | Jonas Smedegaard <dr@jones.dk> | 2006-04-02 16:01:51 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2006-04-02 16:01:51 +0000 |
commit | 67f3fa100fb12ec2216345006c51717929dffeb3 (patch) | |
tree | be6c18ad2a25e25d42ec2b7ea730a75f831e9a6e /apache2/sites-available | |
parent | f2d69c225dd64ba27813cb08b39b512bceaf1368 (diff) |
Add new sample apache2 config snippets.
Diffstat (limited to 'apache2/sites-available')
-rw-r--r-- | apache2/sites-available/lists.secure-example.com | 49 | ||||
-rw-r--r-- | apache2/sites-available/mail.secure-example.com | 36 | ||||
-rw-r--r-- | apache2/sites-available/people.secure-example.com | 41 | ||||
-rw-r--r-- | apache2/sites-available/wiki.secure-example.com | 83 | ||||
-rw-r--r-- | apache2/sites-available/www.secure-example.com | 21 |
5 files changed, 230 insertions, 0 deletions
diff --git a/apache2/sites-available/lists.secure-example.com b/apache2/sites-available/lists.secure-example.com new file mode 100644 index 0000000..dd28c88 --- /dev/null +++ b/apache2/sites-available/lists.secure-example.com @@ -0,0 +1,49 @@ +<VirtualHost *:443> + ServerName lists.secure-example.com:443 + ServerAlias lists + ServerAdmin webmaster@secure-example.com + DocumentRoot /home/admin/public_websites/lists.secure-example.com/ + + Include /etc/apache2/conf.d/local-ssl.conf + + Alias /pipermail /var/lib/mailman/archives/public + Alias /images/mailman /usr/share/images/mailman + ScriptAlias /mailman /usr/lib/cgi-bin/mailman + + RewriteEngine On + RewriteRule ^/$ /mailman/listinfo [R] + RewriteRule ^/mailman(/)?$ /mailman/listinfo [R] + + <Location /images/> + order deny,allow + allow from all + </Location> + + Include /etc/apache2/conf.d/local-log-vhosts.conf + CustomLog "| /usr/sbin/vlogger -s access.log -u admin -g admin -t '%Y.%m.%d' /home/admin/weblogs" combined_vlogger + ErrorLog "| /usr/sbin/vlogger -s error.log -u admin -g admin -t '%Y.%m.%d' -e /home/admin/weblogs/ERRORS" +</VirtualHost> +<VirtualHost *:443> + ServerName www.lists.secure-example.com:443 + ServerAlias *.lists.secure-example.com:443 + ServerAdmin webmaster@secure-example.com + + Include /etc/apache2/conf.d/local-ssl.conf + + RewriteEngine On + RewriteRule / https://lists.secure-example.com/ [R] +# RewriteRule /(.*) https://lists.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> +<VirtualHost *:80> + ServerName lists.secure-example.com + ServerAlias *.lists.secure-example.com + ServerAdmin webmaster@secure-example.com + + RewriteEngine On + RewriteRule / https://lists.secure-example.com/ [R] +# RewriteRule /(.*) https://lists.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> diff --git a/apache2/sites-available/mail.secure-example.com b/apache2/sites-available/mail.secure-example.com new file mode 100644 index 0000000..acb0029 --- /dev/null +++ b/apache2/sites-available/mail.secure-example.com @@ -0,0 +1,36 @@ +<VirtualHost *:443> + ServerName mail.secure-example.com:443 + ServerAlias mail + ServerAdmin webmaster@secure-example.com + DocumentRoot /home/admin/public_websites/mail.secure-example.com/ + + Include /etc/apache2/conf.d/local-ssl.conf + + Include /etc/apache2/conf.d/horde2.conf + <Location /horde2> + Options FollowSymLinks -MultiViews + DirectoryIndex index.php + </Location> +</VirtualHost> +<VirtualHost *:443> + ServerName www.mail.secure-example.com:443 + ServerAlias *.mail.secure-example.com:443 + ServerAdmin webmaster@secure-example.com + + Include /etc/apache2/conf.d/local-ssl.conf + + RewriteEngine On + RewriteRule / https://mail.secure-example.com/ [R] + + TransferLog /dev/null +</VirtualHost> +<VirtualHost *:80> + ServerName mail.secure-example.com + ServerAlias *.mail.secure-example.com + ServerAdmin webmaster@secure-example.com + + RewriteEngine On + RewriteRule / https://mail.secure-example.com/ [R] + + TransferLog /dev/null +</VirtualHost> diff --git a/apache2/sites-available/people.secure-example.com b/apache2/sites-available/people.secure-example.com new file mode 100644 index 0000000..1a83355 --- /dev/null +++ b/apache2/sites-available/people.secure-example.com @@ -0,0 +1,41 @@ +<VirtualHost *:80> + ServerName people.secure-example.com + ServerAlias people + ServerAdmin webmaster@secure-example.com + DocumentRoot /home/admin/public_websites/people.secure-example.com/ + + Include /etc/apache2/conf.d/local-userdir.conf + Include /etc/apache2/conf.d/local-macvolumes.conf + + RewriteEngine On + RewriteRule ^/-(.*)$ http://people.secure-example.com/~$1 [R] + RewriteRule ^/([^~].*)$ http://people.secure-example.com/~$1 [R] + + Include /etc/apache2/conf.d/local-log-vhosts.conf + CustomLog "| /usr/sbin/vlogger -s access.log -u admin -g admin -t '%Y.%m.%d' /home/admin/weblogs" combined_vlogger + ErrorLog "| /usr/sbin/vlogger -s error.log -u admin -g admin -t '%Y.%m.%d' -e /home/admin/weblogs/ERRORS" +</VirtualHost> +<VirtualHost *:80> + ServerName www.people.secure-example.com + ServerAlias *.people.secure-example.com + ServerAdmin webmaster@secure-example.com + + RewriteEngine On + RewriteRule / http://people.secure-example.com/ [R] +# RewriteRule /(.*) http://people.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> +<VirtualHost *:443> + ServerName people.secure-example.com:443 + ServerAlias *.people.secure-example.com:443 + ServerAdmin webmaster@secure-example.com + + Include /etc/apache2/conf.d/local-ssl.conf + + RewriteEngine On + RewriteRule / http://people.secure-example.com/ [R] +# RewriteRule /(.*) http://people.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> diff --git a/apache2/sites-available/wiki.secure-example.com b/apache2/sites-available/wiki.secure-example.com new file mode 100644 index 0000000..f36ddf0 --- /dev/null +++ b/apache2/sites-available/wiki.secure-example.com @@ -0,0 +1,83 @@ +<VirtualHost *:443> + ServerName wiki.secure-example.com + ServerAlias wiki + ServerAdmin webmaster@secure-example.com + DocumentRoot /usr/share/moin/htdocs + + Include /etc/apache2/conf.d/local-ssl.conf + +# <Location /> +# Options +ExecCGI +# </Location> + + <Directory /usr/share/moin/server/> + # Use mod_python as handler + SetHandler python-program + + # set the path to the MoinMoin package and to the wikiconfig.py + PythonPath "['/etc/moin']+sys.path" + + # choose the ModPy Request class as handler + PythonHandler MoinMoin.request::RequestModPy.run + + +# PythonOption Location /moin + </Directory> + + # Use default themes + Alias /wiki/ /usr/share/moin/htdocs/ + + AcceptPathInfo On + + RewriteEngine On + + RewriteLogLevel 1 + + RewriteRule ^/moin(/(.*))? /$2 [last,R] + RewriteRule ^/wiki/ - [last] + RewriteRule ^/robots.txt - [last] + RewriteRule ^/favicon.ico - [last] +# RewriteRule ^/?(.*) /usr/share/moin/server/moin.cgi/$1 [last,type=application/x-httpd-cgi] +# RewriteRule ^/?(.*) /var/local/moin/server/moinmodpy.py$1 [last,type=application/x-python-code] + RewriteRule ^/?(.*) /usr/share/moin/server/moinmodpy.py/$1 [last,type=application/x-python-code] +# RewriteRule ^/?(.*) /var/local/moin/server/moinmodpy.py$1 [last] +# RewriteRule ^/?(.*) moin/$1 [last,type=application/x-python-code] + + Include /etc/apache2/conf.d/local-log-vhosts.conf + CustomLog "| /usr/sbin/vlogger -s access.log -u admin -g admin -t '%Y.%m.%d' /home/admin/weblogs" combined_vlogger + ErrorLog "| /usr/sbin/vlogger -s error.log -u admin -g admin -t '%Y.%m.%d' -e /home/admin/weblogs/ERRORS" +</VirtualHost> +<VirtualHost *:443> + ServerName www.wiki.secure-example.com:443 + ServerAlias *.wiki.secure-example.com:443 + ServerAdmin webmaster@secure-example.com + + Include /etc/apache2/conf.d/local-ssl.conf + + RewriteEngine On +# RewriteRule / https://wiki.secure-example.com/ [R] + RewriteRule /(.*)? https://wiki.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> +<VirtualHost *:80> + ServerName wiki.secure-example.com + ServerAdmin webmaster@secure-example.com + + RewriteEngine On +# RewriteRule / https://wiki.secure-example.com/ [R] + RewriteRule /(.*)? https://wiki.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> +<VirtualHost *:80> + ServerName www.wiki.secure-example.com + ServerAlias *.wiki.secure-example.com + ServerAdmin webmaster@secure-example.com + + RewriteEngine On + RewriteRule / https://wiki.secure-example.com/ [R] +# RewriteRule /(.*)? https://wiki.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> diff --git a/apache2/sites-available/www.secure-example.com b/apache2/sites-available/www.secure-example.com new file mode 100644 index 0000000..ee756ae --- /dev/null +++ b/apache2/sites-available/www.secure-example.com @@ -0,0 +1,21 @@ +<VirtualHost *:80> + ServerName www.secure-example.com + ServerAlias www + ServerAdmin webmaster@secure-example.com + DocumentRoot /home/admin/public_websites/www.secure-example.com/ + + Include /etc/apache2/conf.d/local-log-vhosts.conf + CustomLog "| /usr/sbin/vlogger -s access.log -u admin -g admin -t '%Y.%m.%d' /home/admin/weblogs" combined_vlogger + ErrorLog "| /usr/sbin/vlogger -s error.log -u admin -g admin -t '%Y.%m.%d' -e /home/admin/weblogs/ERRORS" +</VirtualHost> +<VirtualHost *:80> + ServerName secure-example.com + ServerAlias *.www.secure-example.com + ServerAdmin webmaster@secure-example.com + + RewriteEngine On + RewriteRule / http://www.secure-example.com/ [R] +# RewriteRule /(.*) http://www.secure-example.com/$1 [R] + + TransferLog /dev/null +</VirtualHost> |