I have uploaded my first Django Application called survey (Its a work in progress) using mod_wsgi
with Apache
on an Ubuntu
VM but I don't know what the URL of it should be. My VM has been made public through a proxyPass at http://phaedrus.scss.tcd.ie/bias_experiment.
When working on my application locally I simply go to http://127.0.0.1:8000/surveythree/
Based on my urls.py (below) I thought that I would simply have to go to http://phaedrus.scss.tcd.ie/bias_experiment/surveythree/ to see my Survey application online. However I cant seem to find it...
My question: What URL should I be using to locate my Survey Application based on my below settings? Or have I missed some other step in the process?
The project has been uploaded, I have restarted the server, I have set it running with python manage.py runserver
Some of the urls I have tried
- http://phaedrus.scss.tcd.ie/bias_experiment/surveythree/
- http://phaedrus.scss.tcd.ie/bias_experiment/src/surveythree/
- http://phaedrus.scss.tcd.ie/bias_experiment/src/bias_experiment/surveythree/
Below is my setup and what I have tried so far.
NOTE: I have a Bias_Experiment Django Project created in Pydev. It has three applications contained within an src folder.
- survey (my working project)
- polls (a tutorial i was following)
- bias_experiment (the root application with my settings file etc)
My URL patterns from bias_experiment/src/bias_experiment/urls.py
urlpatterns = patterns('',
url(r'^polls/', include('polls.urls', namespace="polls")),
url(r'^admin/', include(admin.site.urls)),
url(r'^surveythree/$', SurveyWizard.as_view([SurveyForm1, SurveyForm2, SurveyForm3, SurveyForm4, SurveyForm5])),
)
My virtual host located at /etc/apache2/sites-available/bias_experiment
<VirtualHost *:80>
ServerAdmin myemail@gmail.com
ServerName phaedrus.scss.tcd.ie/bias_experiment
ServerAlias phaedrus.scss.tcd.ie
WSGIScriptAlias /bias_experiment /var/www/bias_experiment/src/bias_experiment/index.wsgi
Alias /static/ /var/www/bias_experiment/src/bias_experiment/static/
<Location "/static/">
Options -Indexes
</Location >
</VirtualHost >
My WSGI file located at /var/www/bias_experiment/src/bias_experiment/index.wsgi
import os
import sys
import site
# This is to add the src folder
sys.path.append('/var/www/bias_experiment/src/bias_experiment')
os.environ['DJANGO_SETTINGS_MODULE'] = 'bias_experiment.settings'
# Activate your virtual env
activate_env=os.path.expanduser("/var/www/bias_experiment/bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
This is the project structure
I had a previous question related to this which had multiple issues pointed out to me which I have since fixed so I am re-posting this here. I have been following several tutorials as details in that question.
Any help with this would be massively appreciated.
Thanks Deepend
EDIT: My Apache Error Log: tail /var/log/apache2/error.log
(bias_experiment)spillab@kdeg-vm-18:/var/www/bias_experiment/src$ sudo su
root@kdeg-vm-18:/var/www/bias_experiment/src# tail /var/log/apache2/error.log
[Fri Jun 13 16:21:04 2014] [error] [client 134.226.38.233] File does not exist: /var/www/bias_experiment/surveythree, referer: https://stackoverflow.com/questions/24209181/what-should-be-the-url-of-my-django-application/24209864?noredirect=1
[Fri Jun 13 16:22:36 2014] [error] [client 134.226.38.233] PHP Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in /var/www/bias_experiment/brendy.php on line 24, referer: http://phaedrus.scss.tcd.ie/bias_experiment/
[Fri Jun 13 16:22:36 2014] [error] [client 134.226.38.233] PHP Notice: Undefined index: brendy in /var/www/bias_experiment/brendy.php on line 27, referer: http://phaedrus.scss.tcd.ie/bias_experiment/
[Fri Jun 13 16:22:36 2014] [error] [client 134.226.38.233] PHP Notice: Use of undefined constant action - assumed 'action' in /var/www/bias_experiment/brendy.php on line 72, referer: http://phaedrus.scss.tcd.ie/bias_experiment/
[Fri Jun 13 16:22:36 2014] [error] [client 134.226.38.233] PHP Notice: Undefined index: action in /var/www/bias_experiment/brendy.php on line 72, referer: http://phaedrus.scss.tcd.ie/bias_experiment/
[Fri Jun 13 16:22:36 2014] [error] [client 134.226.38.233] PHP Warning: include(footer.php): failed to open stream: No such file or directory in /var/www/bias_experiment/brendy.php on line 118, referer: http://phaedrus.scss.tcd.ie/bias_experiment/
[Fri Jun 13 16:22:36 2014] [error] [client 134.226.38.233] PHP Warning: include(): Failed opening 'footer.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/bias_experiment/brendy.php on line 118, referer: http://phaedrus.scss.tcd.ie/bias_experiment/
[Fri Jun 13 16:22:37 2014] [error] [client 134.226.38.233] File does not exist: /var/www/bias_experiment/special.css, referer: http://phaedrus.scss.tcd.ie/bias_experiment/brendy.php
[Fri Jun 13 16:22:37 2014] [error] [client 134.226.38.233] File does not exist: /var/www/bias_experiment/images, referer: http://phaedrus.scss.tcd.ie/bias_experiment/brendy.php
[Fri Jun 13 16:22:37 2014] [error] [client 134.226.38.233] File does not exist: /var/www/bias_experiment/images, referer: http://phaedrus.scss.tcd.ie/bias_experiment/brendy.php
root@kdeg-vm-18:/var/www/bias_experiment/src#