mirror of https://github.com/fspc/workstand.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
9 years ago
|
server {
|
||
|
listen 80;
|
||
|
server_name www.{{ app_domain_name }};
|
||
|
# $scheme will get the http protocol
|
||
|
# and 301 is best practice for tablet, phone, desktop and seo
|
||
|
return 301 https://{{ app_domain_name }}$request_uri;
|
||
|
}
|
||
|
server {
|
||
|
listen 80;
|
||
|
server_name {{ app_domain_name }};
|
||
|
# $scheme will get the http protocol
|
||
|
# and 301 is best practice for tablet, phone, desktop and seo
|
||
|
return 301 https://{{ app_domain_name }}$request_uri;
|
||
|
}
|
||
|
server {
|
||
|
listen 443 ssl;
|
||
|
server_name {{ app_domain_name }};
|
||
|
|
||
|
ssl_certificate /etc/letsencrypt/live/{{ app_domain_name }}/fullchain.pem;
|
||
|
ssl_certificate_key /etc/letsencrypt/live/{{ app_domain_name }}/privkey.pem;
|
||
|
|
||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||
|
ssl_prefer_server_ciphers on;
|
||
|
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
|
||
|
|
||
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||
|
location /static/ {
|
||
|
root {{ app_dir }}/{{ app_name }};
|
||
|
}
|
||
|
|
||
|
location /media/ {
|
||
|
root {{ app_dir }}/{{ app_name }};
|
||
|
}
|
||
|
|
||
|
location / {
|
||
|
proxy_pass_header Server;
|
||
|
proxy_set_header Host $http_host;
|
||
|
proxy_redirect off;
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
proxy_set_header X-Scheme $scheme;
|
||
|
proxy_connect_timeout 10;
|
||
|
proxy_read_timeout 10;
|
||
|
proxy_pass http://localhost:{{ app_port }}/;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 4051;
|
||
|
server_name events.{{ app_domain_name }};
|
||
|
|
||
|
location /incoming/spikeEvent.php {
|
||
|
proxy_pass_header Server;
|
||
|
proxy_set_header Host $http_host;
|
||
|
proxy_redirect off;
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
proxy_set_header X-Scheme $scheme;
|
||
|
proxy_connect_timeout 10;
|
||
|
proxy_read_timeout 10;
|
||
|
proxy_pass http://localhost:{{ app_port }}/incoming/;
|
||
|
}
|
||
|
}
|