1
0
mirror of https://github.com/fspc/workstand.git synced 2025-03-13 01:43:22 -04:00
workstand/docker/nginx/conf/nginx-site.conf

52 lines
1.5 KiB
Plaintext
Raw Normal View History

2017-01-19 20:15:28 -06:00
server {
2017-01-16 17:58:08 -06:00
listen 80;
server_name www.shop.bcbc.bike;
# $scheme will get the http protocol
# and 301 is best practice for tablet, phone, desktop and seo
return 301 https://shop.bcbc.bike$request_uri;
}
server {
listen 80;
server_name shop.bcbc.bike;
# $scheme will get the http protocol
# and 301 is best practice for tablet, phone, desktop and seo
return 301 https://shop.bcbc.bike$request_uri;
2017-01-19 20:15:28 -06:00
}
2016-07-08 10:55:14 -06:00
server {
2017-01-19 20:15:28 -06:00
# resolver 127.0.0.11 ipv6=off;
2017-01-16 17:58:08 -06:00
listen 443 ssl;
2017-01-19 20:15:28 -06:00
# listen 80;
2016-07-08 10:55:14 -06:00
server_name shop.bcbc.bike;
2017-01-16 17:58:08 -06:00
ssl_certificate /etc/letsencrypt/live/shop.bcbc.bike/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/shop.bcbc.bike/privkey.pem;
2016-07-08 10:55:14 -06:00
2017-01-16 17:58:08 -06:00
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
2016-07-08 10:55:14 -06:00
location = /favicon.ico { access_log off; log_not_found off; }
keepalive_timeout 5;
root /code;
location / {
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app;
}
2017-01-15 19:39:17 -06:00
location /static {
2017-01-16 17:58:08 -06:00
root /code;
2017-01-15 19:39:17 -06:00
}
2016-07-08 10:55:14 -06:00
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# enable this if and only if you use HTTPS
# proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://workstand:8000;
}
}