<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/root
RewriteEngine On
RewriteMap tolower int:tolower
# Redirect all www.
RewriteCond %{HTTP_HOST} ^www\..*$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.(.*) http://$1 [R=301,L]
# For all admin media
RewriteRule ^/media(.*) /usr/share/python-support/python-django/django/contrib/admin/media$1 [L]
# For each project's static files
RewriteRule ^/static(.*) /var/www/${tolower:%{SERVER_NAME}}/static$1
RewriteRule ^/favicon.ico /var/www/${tolower:%{SERVER_NAME}}/static/images/favicon.ico
# For each project's documentation
RewriteRule ^/docs(.*) /var/www/${tolower:%{SERVER_NAME}}/docs/build/html$1
# For each project's WSGI hook
RewriteRule ^/(?!var/www/)(.*) /var/www/${tolower:%{SERVER_NAME}}/apache/django.wsgi/$1
RewriteRule . - [E=APPLICATION_GROUP:${tolower:%{SERVER_NAME}}]
WSGIProcessGroup %{GLOBAL}
WSGIApplicationGroup %{ENV:APPLICATION_GROUP}
# Run mod_wsgi in daemon mode, with daemons named by the site name
WSGIDaemonProcess %{ENV:APPLICATION_GROUP} processes=5 threads=10 python-path=/path/to/common display-name=%{GROUP}
<Directory /var/www/*/apache>
Order allow,deny
Allow from all
Options ExecCGI
AddHandler wsgi-script .wsgi
</Directory>
<Directory /var/www/*/docs>
# You can protect the docs directories here
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
apacheconf
1
<VirtualHost*:80>ServerAdmin webmaster@localhost
DocumentRoot/var/www/rootRewriteEngineOnRewriteMap tolower int:tolower
# Redirect all www.RewriteCond %{HTTP_HOST} ^www\..*$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.(.*) http://$1 [R=301,L]
# For all admin mediaRewriteRule ^/media(.*) /usr/share/python-support/python-django/django/contrib/admin/media$1 [L]
# For each project's static filesRewriteRule ^/static(.*) /var/www/${tolower:%{SERVER_NAME}}/static$1
RewriteRule ^/favicon.ico /var/www/${tolower:%{SERVER_NAME}}/static/images/favicon.ico
# For each project's documentationRewriteRule ^/docs(.*) /var/www/${tolower:%{SERVER_NAME}}/docs/build/html$1
# For each project's WSGI hookRewriteRule ^/(?!var/www/)(.*) /var/www/${tolower:%{SERVER_NAME}}/apache/django.wsgi/$1
RewriteRule . - [E=APPLICATION_GROUP:${tolower:%{SERVER_NAME}}]
WSGIProcessGroup %{GLOBAL}
WSGIApplicationGroup %{ENV:APPLICATION_GROUP}
# Run mod_wsgi in daemon mode, with daemons named by the site name WSGIDaemonProcess %{ENV:APPLICATION_GROUP} processes=5 threads=10 python-path=/path/to/common display-name=%{GROUP}
<Directory/var/www/*/apache>Order allow,deny
Allow from allOptions ExecCGI
AddHandler wsgi-script .wsgi
</Directory><Directory/var/www/*/docs># You can protect the docs directories here</Directory>ErrorLog/var/log/apache2/error.log# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.LogLevelwarnCustomLog/var/log/apache2/access.log combined
</VirtualHost>
Hey there! I see you're running Internet Explorer 6.
That's neat. This reminds me of my grandpa. He had this old car that he kept having to fix. He spent so much money on it that he didn't want to get rid of it (even when it stopped running).
0 Comments