feat: config templates #53, #34, #33

This commit is contained in:
0xJacky 2023-01-05 13:46:42 +08:00
parent 594c61a0ff
commit f5a2a634a1
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
21 changed files with 420 additions and 96 deletions

View file

@ -1,3 +1,9 @@
location / {
try_files $uri $uri/ /index.php;
}
# Nginx UI Template Start
# Name: Codeigniter Rewrite
# Description[en]: Codeigniter URL Rewrite Config
# Description[zh_CN]: Codeigniter 伪静态配置
# Author: @0xJacky
# Nginx UI Template End
location / {
try_files $uri $uri/ /index.php;
}

View file

@ -0,0 +1,13 @@
# Nginx UI Template Start
# Name: PHP8.1
# Description[en]: Enabled PHP 8.1 Config
# Description[zh_CN]: 启用 PHP 8.1 配置
# Author: @0xJacky
# Nginx UI Template End
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}

View file

@ -1,3 +1,9 @@
location / {
try_files $uri $uri/ /server.php?$query_string;
}
# Nginx UI Template Start
# Name: Laravel Rewrite
# Description[en]: Laravel URL Rewrite Config
# Description[zh_CN]: Laravel 伪静态配置
# Author: @0xJacky
# Nginx UI Template End
location / {
try_files $uri $uri/ /server.php?$query_string;
}

View file

@ -0,0 +1,15 @@
# Nginx UI Template Start
# Name: Reverse Proxy
# Description[en]: Reverse Proxy Config
# Description[zh_CN]: 反向代理配置
# Author: @0xJacky
# Nginx UI Template End
location / {
proxy_pass http://127.0.0.1:9000/;
proxy_redirect off;
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 $scheme;
client_max_body_size 1000m;
}

View file

@ -0,0 +1,26 @@
# Nginx UI Template Start
# Name: Reverse Proxy WebSocket
# Description[en]: Reverse Proxy with WebSocket Config
# Description[zh_CN]: 反向代理 WebSocket 配置
# Author: @0xJacky
# Nginx UI Template End
# Nginx UI Custom Start
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Nginx UI Custom End
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://127.0.0.1:9000/;
proxy_redirect off;
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 $scheme;
client_max_body_size 1000m;
}