46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name pc-atlas.tutudog.com;
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
root /etc/nginx/conf.d/.acme-pc;
|
|
try_files $uri =404;
|
|
}
|
|
location / { return 308 https://pc-atlas.tutudog.com$request_uri; }
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name pc-atlas.tutudog.com;
|
|
ssl_certificate ATLAS_PC_CERT_DIR/fullchain.pem;
|
|
ssl_certificate_key ATLAS_PC_CERT_DIR/privkey.pem;
|
|
client_max_body_size 6m;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header X-Forwarded-Port 443;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_connect_timeout 5s;
|
|
proxy_read_timeout 90s;
|
|
|
|
gzip on;
|
|
gzip_types application/javascript text/css;
|
|
|
|
location = /api/admin { return 404; }
|
|
location ^~ /api/admin/ { return 404; }
|
|
location ^~ /api/session/ {
|
|
client_max_body_size 4k;
|
|
limit_req zone=atlas_native_session burst=10 nodelay;
|
|
limit_req_status 429;
|
|
proxy_pass http://ATLAS_VISITOR_API;
|
|
}
|
|
location ^~ /api/ {
|
|
proxy_pass http://ATLAS_VISITOR_API;
|
|
}
|
|
location / {
|
|
proxy_pass http://ATLAS_VISITOR_PC;
|
|
}
|
|
}
|