Given that one of the focuses of this website is technology, and I've just spent the morning on a technological struggle in order to bring said website into being, I thought I'd spend a little time documenting that struggle. Also, in my pursuit of knowledge about the world, I've found articles like this to be incredibly helpful. We live in a world in which, if you have a problem, it is highly likely that both
I wanted to run an Nginx site and an Apache site side by side on the same AWS (that's Amazon Web Services) EC2 Linux micro instance. My wife is a novelist, and I run her website. A t1.micro with a little extra swap space configured can easily handle all of the traffic we garner, and I didn't want to pay the extra $18/month for a second server. www.inquisitivists.com runs on Rails, her website is Perl CGI (and now the more clever amongst you know how old I am).
What you've done here is told Apache that port 80 is a proxy server; it proxies requests for your Nginx domain to port 1080 of the localhost (your EC2 instance), where the Nginx is waiting to serve that site. It proxies requests to your Apache domain to port 2080, where the same Apache is waiting to serve that site. Note that the server in the ProxyPass line is literally "localhost." You're just telling Apache to proxy the local server to get content to serve back to the user. You may or may not be tempted to fill in your actual domain with the port number attached. Like, don't do this: first off it won't work because you haven't opened those ports via EC2 Security groups, and if you do do that, Apache will get really freaking confused.
0 Comments
|
ArchivesCategories |