Большая Тёрка / Мысли / Личная лента olegchir /
upstream new.asterelectro.my { server 127.0.0.1:3000; } server { server_name new.asterelectro.my; root /my/sites/asterel3; location ~ ^/(public/) { root /my/sites/asterel3; access_log off; expires max; #try_files $uri @rw_static_fallback; } #location @rw_static_fallback { # rewrite ^(.*)$ /static-fallback$1 last; #} location / { proxy_pass http://new.asterelectro.my/; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_set_header Connection ""; proxy_http_version 1.1; proxy_cache one; proxy_cache_key asterel3$request_uri$scheme; } error_log /var/log/nginx/asterel3.log; access_log /var/log/nginx/asterel3.log; }
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=300; proxy_temp_path /var/tmp; #default_type application/octet-stream; #sendfile on; #keepalive_timeout 65; #gzip on; gzip_comp_level 6; gzip_vary on; gzip_min_length 1000; gzip_proxied any; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript gzip_buffers 16 8k;