Working on individual modules
This commit is contained in:
85
admin/documentation/nginx_fastapi_server.example.default
Normal file
85
admin/documentation/nginx_fastapi_server.example.default
Normal file
@@ -0,0 +1,85 @@
|
||||
server {
|
||||
access_log /var/log/nginx/access_dev_fastapi.oneskyit.com.log;
|
||||
|
||||
listen 443 ssl; # managed by Certbot
|
||||
listen [::]:443 ssl http2; # managed by Certbot
|
||||
#listen 443 http3 reuseport; # UDP listener for QUIC+HTTP/3
|
||||
server_name dev-fastapi.oneskyit.com;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/oneskyit.com-0001/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/oneskyit.com-0001/privkey.pem; # managed by Certbot
|
||||
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
#add_header Alt-Svc 'quic=":443"'; # Advertise that QUIC is available
|
||||
#add_header QUIC-Status $quic; # Sent when QUIC was used
|
||||
|
||||
include brotli.conf;
|
||||
include gzip.conf;
|
||||
|
||||
client_max_body_size 4096M; # or 4G
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_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 $scheme;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_pass http://unix:/run/gunicorn.sock;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
proxy_set_header Host $http_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 $scheme;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
#proxy_read_timeout 600;
|
||||
#proxy_headers_hash_max_size 1024;
|
||||
|
||||
proxy_pass http://unix:/run/gunicorn.sock;
|
||||
}
|
||||
|
||||
location /ws_redis {
|
||||
proxy_set_header Host $http_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 $scheme;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
#proxy_read_timeout 600;
|
||||
#proxy_headers_hash_max_size 1024;
|
||||
|
||||
proxy_pass http://unix:/run/gunicorn.sock;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = dev-fastapi.oneskyit.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name dev-fastapi.oneskyit.com;
|
||||
return 404; # managed by Certbot
|
||||
}
|
||||
Reference in New Issue
Block a user