I have server running different sites and i need to config nginx reverse proxy for these domains, (example1.com, example2.com, test.example1.com), where dp I need to configure the domains in nginx for reverse proxy.
Nginx reverse proxy for multiple domains and subdomains
multiple-instancesnginxreverse-proxysubdomain
Best Answer
multiple
server{}
blocks andproxy_pass http://origin.server
inlocation
blocks.For example:
nginx Beginner's Guide and Server names in nginx document will help you.
More complex configurations(including /etc/nginx/sites-enabled/.conf, /etc/nginx/sites-available/.conf) are available, but that relies on your distribution packages.