Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name HOSTNAME.HERE;
- access_log /var/log/nginx/HOSTNAME.HERE_http_access.log;
- error_log /var/log/nginx/HOSTNAME.HERE_http_error.log;
- location / {
- proxy_pass http://BACKEND.HOSTNAME.HERE;
- proxy_buffering on;
- proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
- ### Set headers ####
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- ### Most PHP, Python, Rails, Java App can use this header ###
- # proxy_set_header X-Forwarded-Proto https;
- ### By default we don't want to redirect it ####
- proxy_redirect off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement