mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-03 07:53:39 +00:00
45
rootfs/usr/local/nginx/conf/conf.d/npm.conf
Normal file
45
rootfs/usr/local/nginx/conf/conf.d/npm.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
server {
|
||||
listen 81 ssl http2 default_server;
|
||||
listen 81 http3 default_server;
|
||||
|
||||
listen [::]:81 ssl http2 default_server;
|
||||
listen [::]:81 http3 default_server;
|
||||
|
||||
server_name _;
|
||||
ssl_certificate /data/nginx/dummycert.pem;
|
||||
ssl_certificate_key /data/nginx/dummykey.pem;
|
||||
include conf.d/include/ssl-ciphers.conf;
|
||||
include conf.d/include/block-exploits.conf;
|
||||
include conf.d/include/letsencrypt-acme-challenge.conf;
|
||||
add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400';
|
||||
|
||||
location /api {
|
||||
return 301 /api/;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:48693/;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-Scheme $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_read_timeout 15m;
|
||||
proxy_send_timeout 15m;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /app/frontend;
|
||||
if ($request_uri ~ ^/(.*)\.html$) {
|
||||
return 302 /$1;
|
||||
}
|
||||
try_files $uri $uri.html $uri/ /index.html;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user