This is my personal dev server that I recently started setting up. Although Python works as a cgi and standalone test scripts in Python run fine, Django does not seem to be working. All I see is the directory listing in browser of django files. Any help would be appreciated.
My Virtual Host:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
#DocumentRoot /var/www
DocumentRoot /home/aj/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#<Directory /var/www/>
<Directory /home/aj/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
#PythonHandler mod_python.publisher
PythonHandler mod_python.cgihandler
PythonDebug On
</Directory>
<Location "/home/aj/public_html/old/testing/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE testing.settings
PythonOption django.root /testing
PythonDebug On
</Location>
#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
#<Directory /usr/lib/cgi-bin/>
#ScriptAlias /cgi-bin/ /var/www/cgi-bin/
#<Directory /var/www/cgi-bin/>
ScriptAlias /bin/ /home/aj/public_html/
<Directory /home/aj/public_html/>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
I installed Django using
sudo apt-get install python-django