mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-05 17:03:33 +00:00
init PHP rewrite
This commit is contained in:
@@ -6,7 +6,7 @@ ssl_stapling_verify on;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
||||
ssl_session_tickets off;
|
||||
ssl_dhparam /etc/tls/dhparam;
|
||||
ssl_dhparam /etc/dhparam;
|
||||
|
||||
# intermediate configuration. tweak to your needs.
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
@@ -1,36 +0,0 @@
|
||||
server {
|
||||
http3 off;
|
||||
listen 81 ssl default_server;
|
||||
listen [::]:81 ssl default_server;
|
||||
|
||||
server_name _;
|
||||
include conf.d/include/brotli.conf;
|
||||
include conf.d/include/force-tls.conf;
|
||||
include conf.d/include/tls-ciphers.conf;
|
||||
include conf.d/include/block-exploits.conf;
|
||||
|
||||
modsecurity on;
|
||||
modsecurity_rules_file /usr/local/nginx/conf/conf.d/include/modsecurity.conf;
|
||||
|
||||
#ssl_certificate ;
|
||||
#ssl_certificate_key ;
|
||||
#ssl_trusted_certificate ;
|
||||
|
||||
location /api {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
include conf.d/include/proxy-location.conf;
|
||||
|
||||
rewrite ^/api(/.*)$ $1 break;
|
||||
proxy_pass http://127.0.0.1:48693;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /html/frontend;
|
||||
if ($request_uri ~ ^/(.*)\.html$) {
|
||||
return 302 /$1;
|
||||
}
|
||||
try_files $uri $uri.html $uri/ /index.html;
|
||||
}
|
||||
}
|
27
rootfs/usr/local/nginx/conf/conf.d/npmplus.conf
Normal file
27
rootfs/usr/local/nginx/conf/conf.d/npmplus.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
server {
|
||||
http3 off;
|
||||
listen 81 ssl default_server;
|
||||
listen [::]:81 ssl default_server;
|
||||
|
||||
server_name _;
|
||||
include conf.d/include/brotli.conf;
|
||||
include conf.d/include/force-tls.conf;
|
||||
include conf.d/include/tls-ciphers.conf;
|
||||
include conf.d/include/block-exploits.conf;
|
||||
|
||||
#ssl_certificate ;
|
||||
#ssl_certificate_key ;
|
||||
#ssl_trusted_certificate ;
|
||||
|
||||
location / {
|
||||
alias /html/app/public/;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_pass php83;
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user