2
I think one solution could be using a combination of PHP as apache module or through FastCGI and use mod_proxy apache module to do some reverse proxy to access your administration app running with gunicorn
You can have a setup like :
- Front HTTP Server apache on port 80 : www.host.com:80
- Backend HTTP Server gunicorn on another port : other.host.com:8080 or localhost:8080 publicly accessed with mod_proxy and url like www.host.com/admin/
- Media HTTP Server : media.host.com, if it has to be on the same system you can use mod_proxy and run the NGINX server on another TCP port.
Note that you should not be able to get the best performance with the NGINX as a media server hidden behind apache with mod_proxy.
This part of setup relies upon the possibility of having more than one public IP adress on this slice.
1
I found this question and almost went down the path of using Green Unicorn myself. Just a note that uWSGI seems to give significantly better performance than Green Unicorn, see a set of benchmarks here.
Linode has a great howto for configuring uWSGI with Nginx on Ubuntu (it works fine on Debian too).
Iβm now using this setup and very happy with it so far.
- [Django]-Virtualenv, sys.path and site-packages
- [Django]-Postgres connection details in django and chef
- [Django]-Setting up Django website on a shared hosting
- [Django]-Django app with fcgi works only in non daemonized mode
- [Django]-Dealing with legacy django project in new localized projects
-1
For the PHP part consider to install any PHP accelerator like eAccelerator or any other bytecode cache.
This is a more general article but could also be interessting for you.
For the Django part I have no idea / experience.
- [Django]-Manage.py doesn't pass the argument to the command
- [Django]-Django, set initial data to formset with ManyToMany
- [Django]-Django flush query caches
- [Django]-How to create template tags in django and use Form?
- [Django]-Django Nonrel β Working around multi-table inheritance with noSQL?
-1
Iβve been trying to run django behind nginx with WSGI module. It runs OK and pretty fast.
Youβll have to compile your own nginx, but itβs really painless.