News for hackers. Stuff that matters.
Re:Ask HN: How, bottom to top, does a modern web application... by arh68 on Tuesday July 14, 2015 @10:54PM (#9889460)
You can run 1 web server or 2. You need at least one listening on :80; it can either pass the request off to a module (like mod_php, mod_perl, CGI) or it can pass the request off to another web server. The 12factor site is espousing this second approach, separating the front-end server (perhaps nginx on :80) from the application server (perhaps apache on :8080/3000, running mod_whatever, or in their case, a standalone app server like Jetty/Tornado). Almost any web server can run as a reverse proxy, but mod_php/mod_perl usually require a specific server like Apache.

If you've got a dollar, and an hour, maybe run through setting it all up [1], then run lsof -i at the end to understand what's listening on what ports.

[1] https://www.digitalocean.com/community/tutorials/how-to-conf...

Re:Ask HN: How, bottom to top, does a modern web application... by dnotrael on Tuesday July 14, 2015 @11:00PM (#9889479)
Thanks for making the distinction between the 1 and 2 web server set-ups. I actually have a DO droplet and I was looking to move the application to Nginx + FPM just for learning purposes so that tutorial is helpful. I've also read some of the other tutorials on Nginx.
Re:Ask HN: How, bottom to top, does a modern web application... by HatersGunnaHate on Wednesday July 15, 2015 @01:11AM (#9889824)
The way I learned how to setup a server without using a control panel of some kind is by diving right in.

At first I messed around on a local virtual machine running the same distro I planned to use.

In a few hours I had NGINX, PHP-FPM and Rails apps up and running on a server.