Created
February 10, 2018 16:59
-
-
Save henderea/b1bfea6cce3e345684eaf76fb93f03e7 to your computer and use it in GitHub Desktop.
nginx dev server config
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; | |
server_name dev.henderea.com henderea.dev; | |
location ~ /(\d+)(/.*) { | |
proxy_pass http://127.0.0.1:$1$2$is_args$args; | |
proxy_set_header Cookie $http_cookie; | |
proxy_connect_timeout 300; | |
proxy_send_timeout 300; | |
proxy_read_timeout 300; | |
send_timeout 300; | |
sub_filter "\"/" "\"/$1/"; | |
sub_filter_types text/html text/css text/javascript application/javascript; | |
sub_filter_once off; | |
} | |
if ($scheme != "https") { | |
return 301 https://$host$request_uri; | |
} | |
} | |
server { | |
listen 443; | |
server_name dev.henderea.com henderea.dev; | |
ssl_certificate "/etc/dev.henderea.com.crt"; | |
ssl_certificate_key "/etc/dev.henderea.com.key"; | |
ssl on; | |
ssl_session_cache builtin:1000 shared:SSL:10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; | |
ssl_prefer_server_ciphers on; | |
location ~ /(\d+)(/.*) { | |
proxy_pass http://127.0.0.1:$1$2$is_args$args; | |
proxy_set_header Cookie $http_cookie; | |
proxy_connect_timeout 300; | |
proxy_send_timeout 300; | |
proxy_read_timeout 300; | |
send_timeout 300; | |
sub_filter "\"/" "\"/$1/"; | |
sub_filter_types text/html text/css text/javascript application/javascript; | |
sub_filter_once off; | |
} | |
if ($scheme != "https") { | |
return 301 https://$host$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment