3 ms·
You really should use nginx to serve static files and route everything else to apache. The setup is dead simple.
by slig 16y ago
You really should use nginx to serve static files and route everything else to apache. The setup is dead simple.
- baddox 16y agoKnow of any tutorials appropriate for a Linux server noob (I'm comfortable with the Linux command line but haven't done much web deployment other than basic one-click xampp stuff)?
- jordanmessina 16y agoIt's quite easy. Install nginx, update the config file, generally found in '/etc/nginx/sites-enabled/' There are plenty of good nginx config examples out there, but to use it as a reverse proxy you want to do something like: location / { proxy_pass http://127.0.0.1:8080/ http://127.0.0.1:8080/; } You also need to change your ports.conf file for apache to make it run on a different port if you want nginx running on port 80.
- asnark 16y agoI love linode's library: http://library.linode.com/web-servers/nginx/ http://library.linode.com/web-servers/nginx/
- slig 16y agolinode's library and slicehost's tutorials are great for starters.
- simeonf 16y agoActually I had dinner with Graham Dumpleton (mod_wsgi author) recently when he was in the San Francisco and he was speculating about the benefits of having nginx handle all the requests and proxy the django requests to Apache. In this case instead of a memory expensive thread/process under Apache being open while input and output streams to the server, a relatively less expensive nginx thread handles the request or response, basically buffering it and passing it on to the server or client only when data transfer is complete.