Reputation: 1
I want to use nginx as reverse proxy and load balancer, but i don't want Apache as server. It's possible to have two or more nginx as the same time? One as proxy and other serving content?
upstream backend_hosts {
server nginx1;
server nginx2;
}
server {
listen 80;
server_name example.com;
location /proxy-me {
proxy_pass http://backend_hosts;
}
}
Upvotes: 0
Views: 461
Reputation: 6841
Nginx is very capable of hosting a site with one server/location block and being a reverse proxy in another server/location block.
Upvotes: 2