-
-
Save marcoroest87/cff7b1fb10528529f807 to your computer and use it in GitHub Desktop.
nginx proxy
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
server { | |
listen 95.211.218.102:443 ssl spdy; | |
server_name demo.hypershop.nl; | |
root /var/www/demo.hypershop.nl/html; | |
access_log /var/www/demo.hypershop.nl/logs/access_proxy.log; | |
error_log /var/www/demo.hypershop.nl/logs/error_proxy.log; | |
include /etc/nginx/conf.d/demo.hypershop.nl/ssl.conf; | |
include /etc/nginx/conf.d/demo.hypershop.nl/pagespeed.conf; | |
location ~* \.(jpe?g|gif|css|svg|png|js|ico|pdf|zip|tar|t?gz|mp3|wav|swf)$ { | |
expires 1y; | |
add_header Pragma public; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
try_files $uri $uri/ /$1/$2 =404; | |
log_not_found off; | |
} | |
# enable defer_javascript filter just for this page | |
location ~ (activity-trackers) { | |
pagespeed EnableFilters defer_javascript; | |
proxy_pass http://localhost:8081; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Ssl-Offloaded "1"; | |
proxy_buffers 32 4k; | |
proxy_buffer_size 2k; | |
} | |
location / { | |
proxy_pass http://localhost:8081; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Ssl-Offloaded "1"; | |
proxy_buffers 32 4k; | |
proxy_buffer_size 2k; | |
} | |
add_header "X-UA-Compatible" "IE=Edge,chrome=1"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment