I've started a project which I intend to set up on an Apache2 server running Ubuntu. I've created the skeleton of the Django project locally and pushed it to a repo on bitbucket. A friend who provided the server told me that Digital Ocean tutorials may be a good start, so I've been using this to set up wsgi. I deviated slightly from the wording and steps of the tutorial so I'll run through how I did it.
I created a directory at the path
~/public_html/clupus.comand changed into it.I already had a previous skeleton so I cloned it into the current directory. The path now looked like
~/public_html/clupus.com/clupuswhere clupus is a directory containing the project files (manage.py etc.)I created a new virtual host file at
/etc/apache2/sites-available/clupus.comwhich contained the following definition:<VirtualHost *:80> ServerName clupus.com ServerAlias www.clupus.com WSGIScriptAlias / /home/ubuntu/public_html/clupus.com/clupus.wsgi </VirtualHost>I then created the actual wsgi file at
~/public_html/clupus.com/clupus.wsgiwhich contained the following configuration:import os import sys sys.path.append('~/public_html/clupus.com') os.environ['DJANGO_SETTINGS_MODULE'] = 'clupus.clupus.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()Finally I did
sudo a2ensite clupus.comfollowed bysudo service apache2 reload. When I went to access the URL at which the server was located I was met with the default welcome page. Assuming I had to de-activate the default page I didsudo a2dissite 000-defaultfollowed by a reload which now, understandably, gives me a 500 error.
My question is what is the URL I use to access my Django project? I feel like I've set everything up correctly and I'm just not pointing to the right URL.
Also, in the line os.environ['DJANGO_SETTINGS_MODULE'] = 'clupus.clupus.settings' should it be clupus.clupus.settings or just clupus.settings given the hierarchy is ~/public_html/clupus.com/clupus/clupus/settings.py
public_html.