This happened a bit ago, and I am only now finding the time to blog it. Ezra’s blog example wasn’t quite clear regarding how to set up nginx for multiple sites, so I asked him. It was perfectly clear after he answered that each site or port needs it’s own upstream and server directives:
user blah; workerprocesses 6; errorlog logs/error.log debug; pid logs/nginx.pid; events { workerconnections 1024; } http { include conf/mime.types; defaulttype application/octet-stream; …….
upstream mongrelsiteone { server 127.0.0.1:15001; server 127.0.0.1:15002; } server { listen realipnumber:80; root /rails/siteone/current/public; servername www.siteone.com siteone.com; …….. if (!-f $requestfilename) { proxypass http://mongrelsiteone; break; } } #server
upstream mongrelsitetwo { server 127.0.0.1:15003; server 127.0.0.1:15004; } server { listen realipnumber:80; root /rails/sitetwo/current/public; servername www.sitetwo.com sitetwo.com; …….. if (!-f $requestfilename) { proxypass http://mongrelsitetwo; break; } } #server } #http
Also note that if you are going to run ssl, you will need an extra server block for the ssl config, which listens on 443. Thanks again to Ezra for this one.
If you wanted it to build a product you’d find a way to get time to work on it. If you really wanted to start that new hobby you’d sacrifice something to find the time and money to do it.
I'll define a "Wannabe Entrepreneur" as someone who has never made money from their businesses. Here are the different types of wannabes.
In the past few years I've built go-carts, built a 200+ sq ft workshop, written several eBooks. How do I create a life where I have time to work on side projects?
Receive 5 Software projects mistakes we have made over the years and how to avoid them.