How can I run a Django website in production with wsgi

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

klacey gravatar image

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

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 runserver command but I cannot serve web pages through Apache.

Moodle website running at /var/www/html/moodle - no issues need to keep running.
Django code is at /var/www/myapp/myproject is at /var/www/myapp/myproject/myproject/myproject is at /var/www/myapp/myproject/myproject/myproject
httpd.conf has the following
WSGIScriptAlias /myapp /var/www/myapp/myproject/myproject/myproject/
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
Accessing the web page returns an Internal server error

Thanks for any help offered. Ken

edit retag flag offensive close merge delete


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

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