Reputation: 133
I have built a django app and its working fine in local machine, I tried hosting it in Google Cloud Platform.
When I created a VM Instance I was given a dedicated IP, there is already a app called Project. I cloned the repo beside this folder (this is the IP https://130.211.79.74 and this is the link to the default app https://130.211.79.74/Project). I tried accessing my app and I see a 404 error. Is there anything that am missing.
Upvotes: 0
Views: 506
Reputation: 1519
Use the good paths in your wsgi.py file :
import os
import sys
sys.path.append('installdir/apps/django/django_projects/my_new_project')
os.environ.setdefault("PYTHON_EGG_CACHE", "installdir/apps/django/django_projects/my_new_project/egg_cache")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_new_project.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Don't forget to reload Apache so that your modifications are taken into account.
Upvotes: 1