Created
July 30, 2019 13:05
-
-
Save JoaoVagner/04bc5a27cb8512c0b1e191a62f6663a6 to your computer and use it in GitHub Desktop.
nginx.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; | |
upstream docker-nginx { | |
server nginx:80; | |
} | |
upstream docker-apache { | |
server apache:80; | |
} | |
server { | |
listen 8080; | |
location / { | |
proxy_pass http://docker-nginx; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} | |
server { | |
listen 8081; | |
location / { | |
proxy_pass http://docker-apache; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment