upstream harman_web {
server unix:/data/www/harman/shared/tmp/unicorn.socket fail_timeout=0;
keepalive 3;
}
server {
listen 80 default_server;
# server_name harman.bayekeji.com;
location /nginx_status {
allow 127.0.0.1;
deny all;
stub_status on;
}
root /data/www/harman/current/public;
access_log /data/www/harman/shared/log/harman-access.log timed_combined buffer=1k;
error_log /data/www/harman/shared/log/harman-error.log;
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html break;
}
location ~ (/assets|/uploads|/system|/favicon.ico|/*.txt) {
access_log off;
expires 14d;
gzip_static on;
add_header Cache-Control public;
}
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering on;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://harman_web;
gzip on;
}
}
|