Created
October 7, 2016 09:41
-
-
Save pioh/6b6d7a2d91314db3b83f274b9ad19702 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 http2; | |
server_name baikal.srg-it.ru; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript a | |
add_header Access-Control-Allow-Origin *; | |
if ($ssl_protocol = "") { | |
return 301 https://$host$request_uri; | |
} | |
index index.html; | |
access_log /var/log/nginx/baikal.srg-it.ru.access.log combined; | |
error_log /var/log/nginx/baikal.srg-it.ru.error.log; | |
location ~* ^\/api\/.*$ { | |
proxy_pass https://baikal.srg-it.ru:8080; | |
proxy_read_timeout 90; | |
proxy_connect_timeout 90; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location / { | |
root /usr/share/nginx/html/baikal; | |
index index.html; | |
try_files $uri $uri/ /index.html; | |
} | |
gzip on; | |
gzip_buffers 16 8k; | |
gzip_comp_level 6; | |
gzip_http_version 1.1; | |
gzip_proxied any; | |
gzip_vary on; | |
} | |
server { | |
listen *:443 ssl http2; | |
server_name baikal.srg-it.ru; | |
ssl on; | |
ssl_certificate /etc/secret/cert/srg-it.ru.crt.chained; | |
ssl_certificate_key /etc/secret/cert/srg-it.ru.key; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 5m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM- | |
ssl_prefer_server_ciphers on; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript a | |
index index.html; | |
access_log /var/log/nginx/ssl-baikal.srg-it.ru.access.log combined; | |
error_log /var/log/nginx/ssl-baikal.srg-it.ru.error.log; | |
add_header Access-Control-Allow-Origin *; | |
location / { | |
root /usr/share/nginx/html/baikal; | |
index index.html; | |
try_files $uri $uri/ /index.html; | |
} | |
gzip on; | |
gzip_buffers 16 8k; | |
gzip_comp_level 6; | |
gzip_http_version 1.1; | |
gzip_proxied any; | |
gzip_vary on; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment