Question

Firstly, the OS I am working in is Fedora 20.

It seems like every way that is mentioned using Django and Apache is either deprecated, or there is no documentation at all.

I have tried mod_wsgi, and I have it all installed, but there is conflicting documentation. One says you should have a django.wsgi (old Django has this), and more recent documentation say you should have wsgi.py. I have tried both methods and all sorts of different things in the httpd.conf file, nothing works, and it all comes back with Forbidden. Also when just trying the Hello World script it always return an internal server error.

I then tried uwsgi. I can use this to get a uwsgi server up, and this seems to basically work in a similar fashion to just using python3 manage.py runserver, so I installed mod_proxy_uwsgi module for Apache, and there is absolutely no documentation on using this, so I just did something like ProxyPass / wsgi//localhost:8000/ in the httpd.conf. All this does is also returning an internal server error.

The main answer I want is: How exactly do I deploy a Django 1.6 project that uses Python 3, onto Apache?

No correct solution

OTHER TIPS

This didn't work for you? It is listed under Django 1.6... then again, Python 3.x is still kind of iffy for a lot of stuff. https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/modwsgi/

This has been resolved. As it turns out, SELinux was blocking httpd from accessing my Django project. I just used the following command then restarted the computer:

setsebool -P httpd_read_user_content 1
setsebool -P httpd_enable_homedirs 1

This will allow MOD_WSGI to work properly for deployment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top