How to Install OSQA Q and A application in Apache Server. I have mod_python installed but still I am not able to run OSQA. I could not find the easy instruction to install it.
OSQA is a Django application, so first you will need to install Django. You may also need to install other dependencies of the project. (I tried it and had to install html5lib, for example) Also, I would strongly recommend uninstalling mod_python (unless you really need it for something else) and installing mod_wsgi instead, since as far as I know mod_python is deprecated and on its way to being completely unmaintained.
Once you have mod_wsgi installed and enabled in the Apache configuration, you'll need to use the
WSGIScriptAlias directive to enable OSQA.
- When you check out OSQA from SVN, you'll have a directory named
trunkwhich contains a file called
osqa.wsgi.dist. Move that
trunkdirectory to a location of your choice, probably in the same place you store other website files.
- Make sure all files in
trunk(or whatever you renamed it to) are readable by the web server. (They probably already are)
- Read through the file
settings_local.py.distand alter it to suit your needs. You'll at least need to provide a database name and database engine.
In your Apache configuration file, inside the virtual host from which you want OSQA to be served, add the following snippet (modified as described below, of course):
<IfModule wsgi_module> WSGIScriptAlias /osqa /var/www/www.example.com/osqa.wsgi </IfModule>
/osqashould be the URL path under which you want OSQA to be available (it could be
/if you like), and
/var/www/www.example.com/osqa.wsgishould be replaced with the full path to the file
osqa.wsgi(the one you renamed in the previous step).
- Check your Apache configuration and if everything is OK, reload Apache. You should be able to access OSQA at your chosen URL. If anything goes wrong, the error message should give you the information you need to fix it.