nginx Reverse Proxy on Separate Server from Apache
I am in the middle of a fairly large migration between production servers. In the process, I went from a single server hosting ISPConfig and all the necessary services (web, db, mail, dns, etc.) to the multiserver setup described on this site.
I am beginning the process of moving websites from the old server, currently in production, to the new web server. It will be hard for me to move all sites at once or over a small time period, such as a weekend. Therefore, I am looking at the use of a reverse proxy.
I believe I can use a reverse proxy to send requests for sites that have already been moved to the new server. Similarly, requests for sites on the old server would be proxied to the old server.
Once all sites have been moved, I think I may leave the reverse proxy in place and allow it to begin caching static content to improve speed.
After much research, it appears that nginx is the preferred approach for both reverse proxy and static caching.
I have been following the HowtoForge tutorial at:
Users of the tutorial have noted some of the short comings and referred users to the follow up in the forum. Specifically, this forum post is the most useful in my opinion:
I am having some issues. I believe it is because all of the tutorials I have seen regarding the installation of nginx as a reverse proxy assume nginx is installed on the same machine as the original Apache installation.
I have three servers in my installation:
My nginx configuration files are below.
Any assistance is appreciated. Thanks.
If you need an access log on the nginx server, you must create that access log. Otherwise, the Apache backends write their own access logs which should be sufficient in most cases.
I changed my configuration files slightly to make things a little easier (on me) to understand and configure.
I created a default vhost file for nginx as follows:
My intent is to only define vhost files within nginx for the sites that have been moved to the new production server. The default vhost directives above should catch everything else and send the requests to the current (soon to be old) production server.
Does this sound like a logical approach to others?
With the nginx default vhost, I am now receiving a "No Input File Specified" error when browsing to the website. The website I am trying to browse to is running a PHP based content management system. I thought nginx would simply proxy through the dynamic content and let Apache serve up the dynamic content as it always has in the past.
I searched on this error and most who have encountered it have encountered it by running nginx as their webserver instead of a reverse proxy.
|All times are GMT +2. The time now is 17:20.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.