Last active
December 22, 2015 03:48
-
-
Save geta6/6412618 to your computer and use it in GitHub Desktop.
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 80; | |
charset UTF-8; | |
server_name example.net; | |
root /var/www/net.example/public; | |
location / { | |
try_files $uri @app; | |
} | |
location @app { | |
include includes/proxy.conf; | |
proxy_pass http://app; | |
} | |
} |
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
user nginx; | |
worker_processes 8; | |
events { | |
multi_accept off; | |
worker_connections 1024; | |
use epoll; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
keepalive_timeout 70; | |
keepalive_requests 15; | |
sendfile on; | |
send_timeout 60; | |
msie_padding on; | |
msie_refresh off; | |
large_client_header_buffers 4 4k; | |
port_in_redirect off; | |
recursive_error_pages on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
types_hash_max_size 2048; | |
server_names_hash_bucket_size 64; | |
server_tokens off; | |
server_name_in_redirect off; | |
client_max_body_size 4096M; | |
gzip on; | |
gzip_static on; | |
gzip_vary on; | |
gzip_proxied any; | |
gzip_comp_level 6; | |
gzip_buffers 16 8k; | |
gzip_http_version 1.0; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_ciphers AES:HIGH:!ADH:!MD5; #ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; | |
ssl_prefer_server_ciphers on; | |
spdy_max_concurrent_streams 100; | |
spdy_streams_index_size 32; | |
spdy_recv_timeout 30s; | |
spdy_keepalive_timeout 3m; | |
spdy_headers_comp 9; | |
map $scheme $php_https { | |
default off; | |
https on; | |
} | |
fastcgi_cache_path /usr/local/var/lib/nginx/cache/fastcgi levels=1:2 keys_zone=fastcgi:1024m; | |
fastcgi_temp_path /usr/local/var/lib/nginx/tmp/fastcgi; | |
proxy_cache_path /usr/local/var/lib/nginx/cache/proxy levels=1:2 keys_zone=proxy:4m max_size=50m inactive=120m; | |
proxy_temp_path /usr/local/var/lib/nginx/tmp/proxy; | |
proxy_cache_key "$scheme://$host$request_uri"; | |
include configs/*.conf; | |
} |
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
proxy_read_timeout 300; | |
proxy_connect_timeout 300; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Document-Root $document_root; | |
proxy_set_header X-Document-URI $document_uri; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; |
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
upstream app { server 127.0.0.1:3000; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment