Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

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

  1. 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
  2. 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

Sign In or Register to comment.