Nginx as proxy and Apache with Load balancing


I’ve three doplets, one as a Load Balancer and the other two as webservers. Load Balancer is working fine, and the webservers too at the first time.

But when I’ve added Apache to use Nginx as a reverse proxy, to get the most of the webservers, LB with webservers still is working but when I go to:


I can see that Apache isn’t working with PHP.

I’ve configured reading this:

and other guides from you, but still isn’t working. I can guess that the problem is in rpaf.conf, in which I put the IP from Load Balancer.

RPAFproxy_ips LoadBalancerIP

But still isn’t working, can you help me?

Thanks in advance!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi Pablo! <br> <br>Could you clarify what your setup is? What is on each server? Is Nginx in front of Apache on all three, including the load balancer? <br> <br>To use Nginx as a proxy for Apache on the web servers, check out this guide: <br> <br> <br> <br>As for the load balancer, I think you would be better off pick one or the other. Using Nginx as a proxy in front of Apache, which then proxies to one of your web servers add too many steps, in my opinion.