Skip to content

Instantly share code, notes, and snippets.

@myusuf3
Created September 14, 2011 03:05
Show Gist options
  • Save myusuf3/1215763 to your computer and use it in GitHub Desktop.
Save myusuf3/1215763 to your computer and use it in GitHub Desktop.
apache site for wsgi application
# i would suggest naming the file that this is contained in after the website.
# this will respond to everything on port 80 regardless of the site.
<VirtualHost *:80>
# this will limit it to requests coming to brodidyouhear.com
ServerName brodidyouhear.com
# apps directory
DocumentRoot /srv/www/brodidyouhear.com/brodidyouhear
<Directory /srv/www/brodidyouhear.com/brodidyouhear>
Order allow,deny
Allow from all
</Directory>
# paths to MEDIA_ROOT AND STATIC ROOT
Alias /static /srv/www/brodidyouhear.com/brodidyouhear/static
Alias /media /srv/www/brodidyouhear.com/brodidyouhear/media
#absolute path to wsgi file, this is what routes requests to your app.
WSGIScriptAlias / /srv/www/brodidyouhear.com/brodidyouhear/apache/brodidyouhear.wsgi
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment