Skip to content

Instantly share code, notes, and snippets.

@vuquangchien
Created September 3, 2013 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vuquangchien/6419632 to your computer and use it in GitHub Desktop.
Save vuquangchien/6419632 to your computer and use it in GitHub Desktop.
Askbot Apache config
#NOTE: the directory paths used here may be adjusted
#the following two directories must be both readable and writable by apache
WSGISocketPrefix ${APACHE_RUN_DIR}
#WSGIPythonEggs /var/python/eggs
#the following directory must be readable by apache
#WSGIPythonHome /usr/local
#NOTE: all urs below will need to be adjusted if
#settings.FORUM_SCRIPT_ALIAS is anything other than empty string (e.g. = 'forum/')
#this allows "rooting" forum at http://example.com/forum, if you like
#replace with 127.0.0.1 with real IP address
<VirtualHost *:80>
#ServerAdmin you@example.com
DocumentRoot /home/qa
#ServerName example.come
#aliases to serve static media directly
#will probably need adjustment
Alias /m/ /home/qa/static/
Alias /admin/ /home/qa/static/admin/
Alias /upfiles/ /home/qa/askbot/upfiles/
<DirectoryMatch "/home/qa/askbot/skins/([^/]+)/media">
Order deny,allow
Allow from all
</DirectoryMatch>
<Directory "/home/qa/askbot/upfiles">
Order deny,allow
Allow from all
</Directory>
#must be a distinct name within your apache configuration
WSGIDaemonProcess askbot2
WSGIProcessGroup askbot2
WSGIScriptAlias / /home/qa/django.wsgi
CustomLog ${APACHE_LOG_DIR}/askbot.access_log common
ErrorLog ${APACHE_LOG_DIR}/askbot.error_log
LogLevel debug
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment