All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Install django
I am running apache2 server on ubuntu 14. Now i want to config the apache to work with mod_wsgi to run django on a subdirectory of a domain such as www.abc.com/lab, but i always fail to do that.
i have successfully installed python by the way. as i can do python --version
which returns Python 2.7.3. The following are my process of setting up
- i create a pylab folder under /var/www, inside has these files init.py, init.pyc, manage.py, settings.py, settings.pyc, and lastly urls.py
i then go to /etc/apache2/sites-available create a lab file with contents
ServerName /lab
DocumentRoot /var/www/pylab
Options All
AllowOverride All
Require all granted
Alias /static/ /var/www/pylab/static/
Options -Indexes
Alias /media/ /var/www/pylab/media/
Options -Indexes
WSGIScriptAlias / /var/www/pylab/wsgi.py
WSGIDaemonProcess labapi python-path=/var/www/pylabprocesses=2 threads=15 display-name=Pylab
WSGIProcessGroup pylab
But when i access www.abc.com/lab i only sees 404 error, where did i do wrong
Comments
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/
I tried to follow but cant make it work
It looks like ServerName (see http://httpd.apache.org/docs/2.2/mod/core.html#servername) is being used incorrectly. You probably want to use Alias: http://httpd.apache.org/docs/2.2/mod/mod_alias.html