Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I deploy Django 1.6, Python 3.3, and Apache?

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?

like image 869
OzzyGreyman Avatar asked Mar 03 '14 22:03

OzzyGreyman


1 Answers

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/

like image 134
Gorton Fishman Avatar answered Sep 19 '22 05:09

Gorton Fishman