Deploying Douglas with Apache and mod_wsgi¶
This walks through install Douglas as an WSGI application on an Apache web server with mod_wsgi installed.
If you find any issues, please let us know.
If you can help with the documentation efforts, please let us know.
- administrative priveliges to the server
Make sure mod_wsgi is installed correctly and working.
Create a blog—see the instructions for the blog directories,
config.pysetup and other bits of Setting up a blog in
douglas.wsgiscript that looks something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# This is the douglas.wsgi script that powers the _______ # blog. import sys def add_to_path(d): if d not in sys.path: sys.path.insert(0, d) # call add_to_path with the directory that your config.py lives in. add_to_path("/home/joe/blog") # if you have Douglas installed in a directory and NOT as a # Python library, then call add_to_path with the directory that # Douglas lives in. For example, if I untar'd # douglas-1.5.tar.gz into /home/joe/, then add like this: # add_to_path("/home/joe/douglas-1.5/") import Douglas.douglas application = Douglas.douglas.DouglasWSGIApp()
In the Apache conf file, add:
WSGIScriptAlias /myblog /path/to/something.wsgi <Directory /path/to> Order deny,allow Allow from all </Directory>
/myblogto the url path you want your blog to live at.
/path/to/something.wsgito be the absolute path to the .wsgi file set up in step 3.
/path/toto the directory of the .wsgi file.
Restart the Apache web server.
Any time you make changes to Douglas (update, add plugins, change configuration), you’ll have to restart Apache.