server { listen 80; client_max_body_size 4G; server_name fhadmin.hiwavo.com ofhadmin.hiwavo.com; #keepalive_timeout 5; access_log /home/www/fohow/admin.com/log/ngx_access.log main; error_log /home/www/fohow/admin.com/log/ngx_error.log; error_page 500 502 503 504 /50x.html; location = /500.html { root /home/www/fohow/admin.com/public; } error_page 404 /404.html; location = /404.html { root /home/www/fohow/admin.com/public; } location /js { root /home/www/fohow/admin.com/public; } location /css { root /home/www/fohow/admin.com/public; } location /img { root /home/www/fohow/admin.com/public; } root /home/www/fohow/admin.com/public; location / { #allow 113.106.106.3; #allow 113.106.106.2; #deny all; 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_pass http://127.0.0.1:6872; } # static resource routing - both assets folder and favicon.ico location ~* ^/a2ssets/|favicon.ico { # Per RFC2616 - 1 year maximum expiry # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html expires 1y; add_header Cache-Control public; # Some browsers still send conditional-GET requests if there's a # Last-Modified header or an ETag header even if they haven't # reached the expiry date sent in the Expires header. add_header Last-Modified ""; add_header ETag ""; break; } }