Run Django on Subdirectory

106 views
Skip to first unread message

Great Avenger Singh

unread,
Jun 6, 2015, 8:56:49 AM6/6/15
to django...@googlegroups.com
Hello Django and People,

I am able to develop my first application(Google OAuth2) with Django using Python_Social_Auth. It was real fun!

I am also able to run Django on Production server using Apache and mod_wsgi.

Right now stuck in small problem. My application is running in the server root location. (localhost or rawIPaddress)

I want to run it on subpath. Something like localhost/complete/oauth or 192.168.32.34/complete/oauth or <Domain-name>/complete/oauth. I followed the instruction given in official documentation.

my /etc/apache2/sites-available/site.conf file is as follows:

<VirtualHost *:80>



WSGIDaemonProcess example python-path=/var/www/example:/var/www/example/env/lib$
WSGIProcessGroup example
WSGIScriptAlias / /var/www/example/example/wsgi.py

WSGIProcessGroup example
WSGIScriptAlias /complete /var/www/example/example/wsgi.py process-group=example


<Directory /var/www/example/example>
<Files wsgi.py>
Require all granted
</Files>
</Directory>

</VirtualHost>

Please let me know Do I also need to make changes in urls.py and views.py ? or in template/home.html?

Great Avenger Singh

unread,
Jun 6, 2015, 8:59:03 AM6/6/15
to django...@googlegroups.com


On Saturday, 6 June 2015 18:26:49 UTC+5:30, Great Avenger Singh wrote:
Hello Django and People,
 
Please let me know Do I also need to make changes in urls.py and views.py ? or in template/home.html?
 
Apology for incomplete mail:
I am using Django 1.8 Apache 2.X and Ubuntu 14.04 
 
Reply all
Reply to author
Forward
0 new messages