mirror of
https://github.com/Alexander-D-Karpov/concord.git
synced 2026-03-16 22:04:15 +03:00
94 lines
2.5 KiB
Plaintext
94 lines
2.5 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name concord.akarpov.ru;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/html;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name concord.akarpov.ru;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/concord.akarpov.ru/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/concord.akarpov.ru/privkey.pem;
|
|
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
client_max_body_size 100m;
|
|
|
|
location ^~ /files/avatars/ {
|
|
alias /var/www/media/concord/avatars/;
|
|
expires 365d;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
access_log off;
|
|
}
|
|
|
|
location ^~ /files/ {
|
|
alias /var/www/media/concord/;
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
access_log off;
|
|
}
|
|
|
|
location ^~ /concord. {
|
|
grpc_pass grpc://127.0.0.1:19000;
|
|
|
|
grpc_read_timeout 1h;
|
|
grpc_send_timeout 1h;
|
|
|
|
grpc_set_header Host $host;
|
|
grpc_set_header X-Real-IP $remote_addr;
|
|
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
grpc_set_header X-Forwarded-Proto https;
|
|
}
|
|
|
|
location ^~ /grpc. {
|
|
grpc_pass grpc://127.0.0.1:19000;
|
|
|
|
grpc_read_timeout 1h;
|
|
grpc_send_timeout 1h;
|
|
|
|
grpc_set_header Host $host;
|
|
grpc_set_header X-Real-IP $remote_addr;
|
|
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
grpc_set_header X-Forwarded-Proto https;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:18080;
|
|
|
|
proxy_http_version 1.1;
|
|
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-Proto https;
|
|
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
|
|
location ^~ /docs {
|
|
proxy_pass http://127.0.0.1:18080;
|
|
proxy_http_version 1.1;
|
|
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-Proto https;
|
|
}
|
|
|
|
location = /version {
|
|
proxy_pass http://127.0.0.1:18080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
}
|
|
location /metrics { return 404; }
|
|
location /health { return 404; }
|
|
} |