66 lines
1.4 KiB
Plaintext
66 lines
1.4 KiB
Plaintext
|
|
|
|
# Daphne, Django channels backend
|
|
upstream portal-backend {
|
|
server 127.0.0.1:9966;
|
|
}
|
|
|
|
|
|
# PORTAL Test server
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name portal-t portal-t.cod2.regions.tax.nalog.ru;
|
|
|
|
send_timeout 600;
|
|
proxy_connect_timeout 600;
|
|
proxy_send_timeout 600;
|
|
proxy_read_timeout 600;
|
|
|
|
root /var/www/PORTAL_COD2/src/front/dist/;
|
|
include /etc/nginx/mime.types;
|
|
access_log /var/log/nginx/portal.access.log;
|
|
error_log /var/log/nginx/portal.error.log;
|
|
|
|
location / {
|
|
try_files $uri /index.html;
|
|
}
|
|
|
|
|
|
|
|
location /static {
|
|
autoindex on;
|
|
alias /var/www/PORTAL_COD2/src/static/;
|
|
}
|
|
|
|
location /media {
|
|
alias /var/www/PORTAL_COD2/src/media;
|
|
|
|
}
|
|
|
|
location ^~ /api/ {
|
|
client_max_body_size 100m;
|
|
include proxy_params;
|
|
proxy_pass http://portal-backend;
|
|
}
|
|
|
|
location ^~ /admin {
|
|
include proxy_params;
|
|
proxy_pass http://portal-backend;
|
|
}
|
|
|
|
|
|
location /ws/ {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_redirect off;
|
|
proxy_pass http://portal-backend;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $server_name;
|
|
}
|
|
}
|