django - Apache is not interpreting python files -


so, followed tutorial on ubuntu 14.04 http://jee-appy.blogspot.in/2015/04/deploy-django-project-on-apache-using.html thing changed instead of example repository,i have used mine. , getting error

not found requested url / not found on server.

then, edited myproject.conf file change made - wsgiscriptalias /myproject /var/www/myproject.wsgi so, i'm having output index of/ directory , file name. it's not interpreting python files.

had same issue , modified wsgi file this:

import os import sys  path = '/var/www/html/yourapp/' if path not in sys.path:     sys.path.append(path)  path = '/var/www/html/yourapp/yourapp/' if path not in sys.path:     sys.path.append(path)  os.environ['django_settings_module'] = 'yourapp.settings'  import django.core.handlers.wsgi application = django.core.handlers.wsgi.wsgihandler() 

hope helps


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -