How to configure Apache as a reverse proxy for nginx?

How to configure Apache as a reverse proxy for nginx?

I have a web server running an LAMP stack.

The default host file for this is /etc/hosts 127.0.1 localhost
127.1 www.localhost
I have an nginx server that needs to proxy everything to my Apache web server.html?favicon.ico
Apache/2.15 (Unix) modssl/2.15 OpenSSL/1.1e-fips-rhel5 modjk/1.

When I run the nginx configuration in my server I'm unable to view the web site or get it to work with anything over HTTP. How do I configure Apache as a reverse proxy for nginx so that HTTP connections are accepted? Here's the nginx configuration: location @php.
Try something like this.

How to configure reverse proxy in Apache?

I have 2 Web-Servers behind a load balancer.

The load balancer serves many web server machines at one time. And, these machines are running Apache. For these Apache web server, I want them to access each other through a reverse-proxy and not directly from the clients. I dont want the clients contacting the "real" web server machines.0>1:80
BalancerMember 127.1:8001 BalancerMember 127.1:8002 ProxySet stickysession=HASH:/session. . ProxyPass /. ProxyPassReverse /. . Is this possible to achieve? Does it make sense at all? Any pointers or comments will be highly appreciated! Thanks! It might be a good idea to check out HTTP Load Balancing with modproxybalancermodule module. This is also explained very well in documentation and in this presentation.

Also, consider using HAPROXY which has a nice config file format called httpd.conf which can contain your reverse proxies rules and directives.

This will give you load balancing between Apache httpd's using modproxybalancermodule module.

Related Answers

What are the two types of proxies?

You can use a reverse proxy for multiple reasons, but mostly it is us...

Does Apache support reverse proxy?

I have a.war application which is deployed in the Tomcat server. br...

Why is it called a reverse proxy?

What is the difference between a reverse proxy an...