Report this

What is the reason for this report?

Nginx as proxy and Apache with Load balancing

Posted on May 10, 2014

Hello!

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:

http://LoadbalancerIP/test.php

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

I’ve configured reading this:

http://www.nginxtips.com/how-to-configure-nginx-as-a-reverse-proxy-for-apache/#comment-31113

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!



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!

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.

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>https://digitalocean.com/community/articles/how-to-configure-nginx-as-a-front-end-proxy-for-apache <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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.