Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- events { }
- http {
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 15;
- types_hash_max_size 2048;
- server_tokens off;
- include /etc/nginx/mime.types;
- default_type text/javascript;
- access_log off;
- error_log /var/log/nginx/error.log;
- gzip on;
- gzip_min_length 100;
- gzip_http_version 1.1;
- gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
- client_max_body_size 8M;
- server {
- listen 80;
- server_name tkoegais.ru lk.tkoegais.ru lk.tko.ac-mpr.ru tko.ac-mpr.ru;
- server_tokens off;
- location /.well-known/acme-challenge/ {
- root /var/www/certbot;
- }
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl;
- server_name tkoegais.ru www.tkoegais.ru;
- rewrite_log on;
- ssl_certificate /etc/letsencrypt/live/tkoegais.ru/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/tkoegais.ru/privkey.pem;
- include /etc/letsencrypt/options-ssl-nginx.conf;
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
- add_header Strict-Transport-Security 'max-age=604800';
- location / {
- root /var/www/egais;
- try_files $uri /index.html;
- }
- location /support/ {
- root /var/data/egais/;
- }
- location /egais-api {
- proxy_pass http://egais_web_server:8081;
- proxy_redirect off;
- #proxy_redirect default;
- client_max_body_size 5m;
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
- proxy_pass_request_headers on;
- proxy_set_header Host $host;
- proxy_set_header X-URI $uri;
- proxy_set_header X-ARGS $args;
- proxy_set_header Refer $http_refer;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /egais-api/management {
- auth_basic "Administrator area";
- auth_basic_user_file /etc/nginx/htpasswd;
- proxy_pass http://egais_web_server:8081;
- proxy_redirect off;
- #proxy_redirect default;
- client_max_body_size 5m;
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
- proxy_pass_request_headers on;
- proxy_set_header Host $host;
- proxy_set_header X-URI $uri;
- proxy_set_header X-ARGS $args;
- proxy_set_header Refer $http_refer;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /api/v2/websocket/ {
- access_log off;
- proxy_pass http://localhost:9999;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- # WebSocket support (nginx 1.4)
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- # Path rewriting
- #rewrite /api/v2/websocket/(.*) /$1 break;
- proxy_redirect off;
- }
- }
- server {
- listen 80;
- server_name lk.tkoegais.ru lk.tko.ac-mpr.ru;
- server_tokens off;
- location / {
- return 301 https://$host$request_uri;
- }
- }
- server {
- listen 443 ssl;
- server_name lk.tkoegais.ru lk.tko.ac-mpr.ru;
- rewrite_log on;
- ssl_certificate /etc/letsencrypt/live/tkoegais.ru/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/tkoegais.ru/privkey.pem;
- include /etc/letsencrypt/options-ssl-nginx.conf;
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
- add_header Strict-Transport-Security 'max-age=604800';
- location / {
- root /var/www/egaislk;
- try_files $uri /index.html;
- }
- location /support/ {
- root /var/data/egais/;
- }
- location /egaislk-api {
- proxy_pass http://egais_userpanel_server:8080;
- proxy_redirect off;
- #proxy_redirect default;
- client_max_body_size 5m;
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
- proxy_pass_request_headers on;
- proxy_set_header Host $host;
- proxy_set_header X-URI $uri;
- proxy_set_header X-ARGS $args;
- proxy_set_header Refer $http_refer;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /egaislk-api/management {
- auth_basic "Administrator area";
- auth_basic_user_file /etc/nginx/htpasswd;
- proxy_pass http://egais_userpanel_server:8080;
- proxy_redirect off;
- #proxy_redirect default;
- client_max_body_size 5m;
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
- proxy_pass_request_headers on;
- proxy_set_header Host $host;
- proxy_set_header X-URI $uri;
- proxy_set_header X-ARGS $args;
- proxy_set_header Refer $http_refer;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement