mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: added format code to config editor
This commit is contained in:
parent
5cc9068f5f
commit
594c61a0ff
13 changed files with 230 additions and 22 deletions
3
template/block/codeigniter.conf
Normal file
3
template/block/codeigniter.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
3
template/block/laravel.conf
Normal file
3
template/block/laravel.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
location / {
|
||||
try_files $uri $uri/ /server.php?$query_string;
|
||||
}
|
33
template/conf/nginx-ui.conf
Normal file
33
template/conf/nginx-ui.conf
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Nginx UI Template Start
|
||||
# Name: Nginx UI
|
||||
# Description[en]: Nginx UI Config Template
|
||||
# Description[zh_CN]: Nginx UI 配置模板
|
||||
# Author: @0xJacky
|
||||
# Nginx UI Template End
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ;
|
||||
rewrite ^(.*)$ https://$host$1 permanent;
|
||||
}
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name ;
|
||||
ssl_certificate ;
|
||||
ssl_certificate_key ;
|
||||
location / {
|
||||
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;
|
||||
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/;
|
||||
}
|
||||
}
|
45
template/conf/wordpress.conf
Normal file
45
template/conf/wordpress.conf
Normal file
|
@ -0,0 +1,45 @@
|
|||
# Nginx UI Template Start
|
||||
# Name: WordPress-PHP8.1
|
||||
# Description[en]: WordPress PHP 8.1 Config Template
|
||||
# Description[zh_CN]: WordPress PHP 8.1 配置模板
|
||||
# Author: @0xJacky
|
||||
# Nginx UI Template End
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ;
|
||||
rewrite ^(.*)$ https://$host$1 permanent;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name ;
|
||||
ssl_certificate ;
|
||||
ssl_certificate_key ;
|
||||
root ;
|
||||
index index.php;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi.conf;
|
||||
}
|
||||
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
# Add trailing slash to */wp-admin requests.
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
|
||||
location /.well-known {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real_IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
|
||||
proxy_pass http://127.0.0.1:{{ HTTP01PORT }};
|
||||
}
|
||||
|
||||
}
|
|
@ -2,5 +2,5 @@ package template
|
|||
|
||||
import "embed"
|
||||
|
||||
//go:embed *
|
||||
//go:embed conf/* block/*
|
||||
var DistFS embed.FS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue