65 lines
1.5 KiB
Plaintext
65 lines
1.5 KiB
Plaintext
upstream faye_server {
|
|
server laradock.com:9292;
|
|
}
|
|
|
|
upstream production {
|
|
server unix:/home/deploy/laradock/current/tmp/sockets/unicorn-production.socket fail_timeout=0;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80 ipv6only=on;
|
|
server_name laradock.com;
|
|
root /home/deploy/laradock/current/public;
|
|
|
|
client_max_body_size 300M;
|
|
keepalive_timeout 120;
|
|
send_timeout 120;
|
|
underscores_in_headers on;
|
|
|
|
error_page 500 /500.html;
|
|
try_files /system/maintenance.html $uri/index.html $uri @unicorn;
|
|
|
|
proxy_http_version 1.1;
|
|
chunked_transfer_encoding off;
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
|
|
proxy_connect_timeout 43200000;
|
|
proxy_read_timeout 43200000;
|
|
proxy_send_timeout 43200000;
|
|
|
|
location ~ ^/(assets)/ {
|
|
root /home/deploy/laradock/current/public;
|
|
gzip_static on;
|
|
expires 1y;
|
|
add_header Cache-Control public;
|
|
break;
|
|
}
|
|
|
|
location @unicorn {
|
|
proxy_set_header X-Request-Start "t=${msec}000";
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
proxy_pass http://production;
|
|
}
|
|
|
|
location /pub-sub {
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
|
|
proxy_pass http://faye_server;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
if ($http_user_agent ~* (EasouSpider) ) {
|
|
return 403;
|
|
}
|
|
|
|
} |