How can I run a Django website in production with wsgi

asked 2016-08-15 16:23:36 -0600

klacey gravatar image

updated 2016-08-18 03:53:01 -0600

I have searched the web and setup virtual web but still cannot get wsgi and python to run in production with Python 2.7 on Apache in Fedora 23. The Django web server runs from the manage.py runserver command but I cannot serve web pages through Apache.

Background.
Moodle website running at /var/www/html/moodle - no issues need to keep running.
Django code is at /var/www/myapp/myproject
settings.py is at /var/www/myapp/myproject/myproject/myproject
wsgi.py is at /var/www/myapp/myproject/myproject/myproject
httpd.conf has the following
WSGIScriptAlias /myapp /var/www/myapp/myproject/myproject/myproject/wsgi.py
Alias /myapp/static /var/www/myapp/myproject/myproject/static
AddType text/html .py
<directory ⁄var⁄www⁄myapp⁄> order deny,allow allow from all <⁄directory>
order deny,allow
allow from all
<⁄directory>
Accessing the web page returns an Internal server error

Thanks for any help offered. Ken

edit retag flag offensive close merge delete

Comments

Did you set the correct SELinux-context on ⁄var⁄www⁄myapp?

beduine gravatar imagebeduine ( 2016-08-18 05:51:53 -0600 )edit