Created
January 10, 2017 19:05
-
-
Save magnusdahlstrand/8e3109ad8e30979a55d82a1e55cda1d4 to your computer and use it in GitHub Desktop.
nginx configuration to forward requests to apache if there's no nginx server block handling the specific request
This file contains hidden or 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
server { | |
listen 8999 default_server; | |
server_name _; | |
location / { | |
# return 418; #teacup for test | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_pass http://127.0.0.1:8080; | |
} | |
location ~ /\. { | |
deny all; | |
access_log off; | |
log_not_found off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment