mirror of https://github.com/midoks/mdserver-web
parent
b124aabb7b
commit
f46c28b39d
@ -1,42 +0,0 @@ |
||||
[ |
||||
{ |
||||
"title":"全部", |
||||
"type":0, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"已安装", |
||||
"type":-1, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"运行环境", |
||||
"type":1, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"数据软件", |
||||
"type":2, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"代码管理", |
||||
"type":3, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"系统工具", |
||||
"type":4, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"其他插件", |
||||
"type":5, |
||||
"ps":"" |
||||
}, |
||||
{ |
||||
"title":"辅助插件", |
||||
"type":6, |
||||
"ps":"" |
||||
} |
||||
] |
@ -1,146 +0,0 @@ |
||||
|
||||
CREATE TABLE IF NOT EXISTS `backup` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`type` INTEGER, |
||||
`name` TEXT, |
||||
`pid` INTEGER, |
||||
`filename` TEXT, |
||||
`size` INTEGER, |
||||
`add_time` TEXT |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `binding` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`pid` INTEGER, |
||||
`domain` TEXT, |
||||
`path` TEXT, |
||||
`port` INTEGER, |
||||
`add_time` TEXT |
||||
); |
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `crontab` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`name` TEXT, |
||||
`type` TEXT, |
||||
`where1` TEXT, |
||||
`where_hour` INTEGER, |
||||
`where_minute` INTEGER, |
||||
`echo` TEXT, |
||||
`status` INTEGER DEFAULT '1', |
||||
`save` INTEGER DEFAULT '3', |
||||
`backup_to` TEXT DEFAULT 'off', |
||||
`sname` TEXT, |
||||
`sbody` TEXT, |
||||
'stype' TEXT, |
||||
`url_address` TEXT, |
||||
`add_time` TEXT, |
||||
`update_time` TEXT |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `firewall` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`port` TEXT, |
||||
`protocol` TEXT DEFAULT 'tcp', |
||||
`ps` TEXT, |
||||
`add_time` TEXT, |
||||
`update_time` TEXT |
||||
); |
||||
|
||||
ALTER TABLE `firewall` ADD COLUMN `protocol` TEXT DEFAULT 'tcp'; |
||||
|
||||
INSERT INTO `firewall` (`id`, `port`, `protocol`, `ps`, `add_time`) VALUES |
||||
(1, '80', 'tcp','网站默认端口', '0000-00-00 00:00:00','0000-00-00 00:00:00'), |
||||
(2, '443', 'tcp/udp', 'HTTPS', '0000-00-00 00:00:00','0000-00-00 00:00:00'); |
||||
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `logs` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`type` TEXT, |
||||
`log` TEXT, |
||||
`uid` INTEGER DEFAULT '1', |
||||
`add_time` TEXT |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `sites` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`name` TEXT, |
||||
`path` TEXT, |
||||
`status` TEXT, |
||||
`index` TEXT, |
||||
`type_id` INTEGER, |
||||
`ps` TEXT, |
||||
`edate` TEXT, |
||||
`ssl_effective_date` TEXT, |
||||
`ssl_expiration_date` TEXT, |
||||
`add_time` TEXT, |
||||
`update_time` TEXT |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `site_types` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`name` TEXT |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `domain` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`pid` INTEGER, |
||||
`name` TEXT, |
||||
`port` INTEGER, |
||||
`add_time` TEXT |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `users` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`name` TEXT, |
||||
`password` TEXT, |
||||
`login_ip` TEXT, |
||||
`login_time` TEXT, |
||||
`phone` TEXT, |
||||
`email` TEXT, |
||||
`add_time` INTEGER, |
||||
`update_time` INTEGER |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `tasks` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`name` TEXT, |
||||
`type` TEXT, |
||||
`start` INTEGER, |
||||
`end` INTEGER, |
||||
`cmd` TEXT, |
||||
`status` INTEGER, |
||||
`add_time` INTEGER |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `temp_login` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`token` REAL, |
||||
`salt` REAL, |
||||
`state` INTEGER, |
||||
`login_time` INTEGER, |
||||
`login_addr` REAL, |
||||
`logout_time` INTEGER, |
||||
`expire` INTEGER, |
||||
`add_time` INTEGER |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `panel` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`title` TEXT, |
||||
`url` TEXT, |
||||
`username` TEXT, |
||||
`password` TEXT, |
||||
`click` INTEGER, |
||||
`add_time` INTEGER |
||||
); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `option` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`name` TEXT, |
||||
`type` TEXT, |
||||
`value` TEXT |
||||
); |
||||
|
||||
CREATE UNIQUE INDEX name_idx ON option(name); |
@ -1,41 +0,0 @@ |
||||
CREATE TABLE IF NOT EXISTS `network` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`up` TEXT, |
||||
`down` TEXT, |
||||
`total_up` INTEGER, |
||||
`total_down` INTEGER, |
||||
`down_packets` INTEGER, |
||||
`up_packets` INTEGER, |
||||
`addtime` INTEGER |
||||
); |
||||
CREATE INDEX addtime_idx ON network(`addtime`); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `cpuio` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`pro` TEXT, |
||||
`mem` TEXT, |
||||
`addtime` INTEGER |
||||
); |
||||
CREATE INDEX addtime_idx ON cpuio(`addtime`); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `diskio` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`read_count` INTEGER, |
||||
`write_count` INTEGER, |
||||
`read_bytes` INTEGER, |
||||
`write_bytes` INTEGER, |
||||
`read_time` INTEGER, |
||||
`write_time` INTEGER, |
||||
`addtime` INTEGER |
||||
); |
||||
CREATE INDEX addtime_idx ON diskio(`addtime`); |
||||
|
||||
CREATE TABLE IF NOT EXISTS `load_average` ( |
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT, |
||||
`pro` REAL, |
||||
`one` REAL, |
||||
`five` REAL, |
||||
`fifteen` REAL, |
||||
`addtime` INTEGER |
||||
); |
||||
CREATE INDEX addtime_idx ON load_average(`addtime`); |
@ -1 +0,0 @@ |
||||
存放VIP关键数据 |
@ -0,0 +1,10 @@ |
||||
location / { |
||||
rewrite ^([^\.]*)/listinfo-(.+?)-(.+?)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/showinfo-(.+?)-(.+?)-(.+?)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last; |
||||
rewrite ^([^\.]*)/infotype-(.+?)-(.+?)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\.html$ $1/e/pl/index\.php\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last; |
||||
if (!-e $request_filename) { |
||||
return 404; |
||||
} |
||||
} |
@ -0,0 +1,43 @@ |
||||
location / { |
||||
|
||||
# https://www.cloudflare.com/zh-cn/ips/ |
||||
set_real_ip_from 173.245.48.0/20; |
||||
set_real_ip_from 103.21.244.0/22; |
||||
set_real_ip_from 103.22.200.0/22; |
||||
set_real_ip_from 103.31.4.0/22; |
||||
set_real_ip_from 141.101.64.0/18; |
||||
set_real_ip_from 108.162.192.0/18; |
||||
set_real_ip_from 190.93.240.0/20; |
||||
set_real_ip_from 188.114.96.0/20; |
||||
set_real_ip_from 197.234.240.0/22; |
||||
set_real_ip_from 198.41.128.0/17; |
||||
set_real_ip_from 162.158.0.0/15; |
||||
set_real_ip_from 104.16.0.0/13; |
||||
set_real_ip_from 104.24.0.0/14; |
||||
set_real_ip_from 172.64.0.0/13; |
||||
set_real_ip_from 131.0.72.0/22; |
||||
set_real_ip_from 2400:cb00::/32; |
||||
set_real_ip_from 2606:4700::/32; |
||||
set_real_ip_from 2803:f800::/32; |
||||
set_real_ip_from 2405:b500::/32; |
||||
set_real_ip_from 2405:8100::/32; |
||||
set_real_ip_from 2a06:98c0::/29; |
||||
set_real_ip_from 2c0f:f248::/32; |
||||
# use any of the following two |
||||
real_ip_header CF-Connecting-IP; |
||||
#real_ip_header X-Forwarded-For; |
||||
|
||||
|
||||
index index.html index.php; |
||||
if (-f $request_filename/index.html){ |
||||
rewrite (.*) $1/index.html break; |
||||
} |
||||
if (-f $request_filename/index.php){ |
||||
rewrite (.*) $1/index.php; |
||||
} |
||||
if (!-f $request_filename){ |
||||
rewrite (.*) /index.php; |
||||
} |
||||
} |
||||
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent; |
@ -0,0 +1,12 @@ |
||||
location / { |
||||
rewrite ^/list-([0-9]+)\.html$ /plus/list.php?tid=$1 last; |
||||
rewrite ^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last; |
||||
rewrite ^/view-([0-9]+)-1\.html$ /plus/view.php?arcID=$1 last; |
||||
rewrite ^/view-([0-9]+)-([0-9]+)\.html$" /plus/view.php?aid=$1&pageno=$2 last; |
||||
rewrite ^/plus/list-([0-9]+)\.html$ /plus/list.php?tid=$1 last; |
||||
rewrite ^/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last; |
||||
rewrite ^/plus/view-([0-9]+)-1\.html$ /plus/view.php?arcID=$1 last; |
||||
rewrite ^/plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?aid=$1&pageno=$2 last; |
||||
rewrite ^/tags.html$ /tags.php last; |
||||
rewrite ^/tag-([0-9]+)-([0-9]+)\.html$ /tags.php?/$1/$2/ last; |
||||
} |
@ -0,0 +1,18 @@ |
||||
location / { |
||||
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; |
||||
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; |
||||
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last; |
||||
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last; |
||||
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last; |
||||
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last; |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /index.php last; |
||||
} |
||||
|
||||
#if (!-e $request_filename) { |
||||
# return 404; |
||||
#} |
||||
} |
@ -0,0 +1,14 @@ |
||||
location /bbs/ { |
||||
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; |
||||
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; |
||||
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last; |
||||
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last; |
||||
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last; |
||||
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last; |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /index.php last; |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
location / { |
||||
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; |
||||
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; |
||||
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; |
||||
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last; |
||||
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last; |
||||
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last; |
||||
rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last; |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /index.php last; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,5 @@ |
||||
location / { |
||||
if (!-e $request_filename) { |
||||
rewrite ^/(.*)$ /index.php?q=$1 last; |
||||
} |
||||
} |
@ -0,0 +1,33 @@ |
||||
location / { |
||||
if (!-e $request_filename) { |
||||
rewrite "^/index\.html" /index.php last; |
||||
rewrite "^/category$" /index.php last; |
||||
rewrite "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last; |
||||
rewrite "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last; |
||||
rewrite "^/feed\.xml$" /feed.php last; |
||||
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last; |
||||
rewrite "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last; |
||||
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last; |
||||
rewrite "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2&page=$3 last; |
||||
rewrite "^/category-([0-9]+)-b([0-9]+)(.*)\.html$" /category.php?id=$1&brand=$2 last; |
||||
rewrite "^/category-([0-9]+)(.*)\.html$" /category.php?id=$1 last; |
||||
rewrite "^/goods-([0-9]+)(.*)\.html" /goods.php?id=$1 last; |
||||
rewrite "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last; |
||||
rewrite "^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$" /article_cat.php?id=$1&page=$2 last; |
||||
rewrite "^/article_cat-([0-9]+)(.*)\.html$" /article_cat.php?id=$1 last; |
||||
rewrite "^/article-([0-9]+)(.*)\.html$" /article.php?id=$1 last; |
||||
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last; |
||||
rewrite "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2&page=$3 last; |
||||
rewrite "^/brand-([0-9]+)-c([0-9]+)(.*)\.html" /brand.php?id=$1&cat=$2 last; |
||||
rewrite "^/brand-([0-9]+)(.*)\.html" /brand.php?id=$1 last; |
||||
rewrite "^/tag-(.*)\.html" /search.php?keywords=$1 last; |
||||
rewrite "^/snatch-([0-9]+)\.html$" /snatch.php?id=$1 last; |
||||
rewrite "^/group_buy-([0-9]+)\.html$" /group_buy.php?act=view&id=$1 last; |
||||
rewrite "^/auction-([0-9]+)\.html$" /auction.php?act=view&id=$1 last; |
||||
rewrite "^/exchange-id([0-9]+)(.*)\.html$" /exchange.php?id=$1&act=view last; |
||||
rewrite "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last; |
||||
rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last; |
||||
rewrite "^/exchange-([0-9]+)-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1&page=$2 last; |
||||
rewrite "^/exchange-([0-9]+)(.*)\.html$" /exchange.php?cat_id=$1 last; |
||||
} |
||||
} |
@ -0,0 +1,7 @@ |
||||
location / { |
||||
index index.php index.html; |
||||
if (!-e $request_filename) |
||||
{ |
||||
rewrite ^/(.*)$ /index.php last; |
||||
} |
||||
} |
@ -0,0 +1,5 @@ |
||||
location ~/group([0-9])/M00 { |
||||
# Need to cooperate with it |
||||
# https://github.com/mw-plugin/fastdfs |
||||
ngx_fastdfs_module; |
||||
} |
@ -0,0 +1,9 @@ |
||||
|
||||
add_header Access-Control-Allow-Origin *; |
||||
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; |
||||
|
||||
location / { |
||||
proxy_pass http://127.0.0.1:8000; # 这里是指向 gunicorn host 的服务地址 |
||||
proxy_set_header Host $host; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
} |
@ -0,0 +1,15 @@ |
||||
|
||||
add_header 'Access-Control-Allow-Methods' 'GET,OPTIONS,POST' always; |
||||
add_header 'Access-Control-Allow-Credentials' 'true' always; |
||||
add_header 'Access-Control-Allow-Origin' $http_origin always; |
||||
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, X-Requested-With, Cache-Control' always; |
||||
|
||||
|
||||
|
||||
#add_header Access-Control-Allow-Origin *; |
||||
#add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; |
||||
|
||||
|
||||
#add_header Access-Control-Allow-Origin *; |
||||
#add_header Access-Control-Allow-Methods *; |
||||
#add_header Access-Control-Allow-Header *; |
@ -0,0 +1,3 @@ |
||||
location / { |
||||
try_files $uri $uri/ /index.php$is_args$query_string; |
||||
} |
@ -0,0 +1,6 @@ |
||||
location / { |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /index.php/$1 last; |
||||
break; |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
#PROXY-START/ |
||||
# root /www/server/nezha/dashboard/resource; |
||||
location / { |
||||
proxy_pass http://127.0.0.1:9527; |
||||
proxy_set_header Host $http_host; |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
} |
||||
location ~ ^/(ws|terminal/.+)$ { |
||||
proxy_pass http://127.0.0.1:9527; |
||||
proxy_http_version 1.1; |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
proxy_set_header Connection "Upgrade"; |
||||
proxy_set_header Host $http_host; |
||||
} |
||||
#PROXY-END/ |
@ -0,0 +1,9 @@ |
||||
location / { |
||||
###以下为PHPCMS 伪静态化rewrite法则 |
||||
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3; |
||||
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3; |
||||
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2; |
||||
####以下为PHPWind 伪静态化rewrite法则 |
||||
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last; |
||||
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last; |
||||
} |
@ -0,0 +1,4 @@ |
||||
location / { |
||||
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last; |
||||
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last; |
||||
} |
@ -0,0 +1,7 @@ |
||||
|
||||
location / { |
||||
proxy_pass http://localhost:11334/; |
||||
proxy_set_header Host $host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
} |
@ -0,0 +1,8 @@ |
||||
location / { |
||||
proxy_redirect off; |
||||
proxy_pass http://127.0.0.1:12345; |
||||
proxy_http_version 1.1; |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
proxy_set_header Connection "upgrade"; |
||||
proxy_set_header Host $http_host; |
||||
} |
@ -0,0 +1,16 @@ |
||||
location / { |
||||
rewrite "^/date/([0-9]{6})/?([0-9]+)?/?$" /index.php?action=article&setdate=$1&page=$2 last; |
||||
rewrite ^/page/([0-9]+)?/?$ /index.php?action=article&page=$1 last; |
||||
rewrite ^/category/([0-9]+)/?([0-9]+)?/?$ /index.php?action=article&cid=$1&page=$2 last; |
||||
rewrite ^/category/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&curl=$1&page=$2 last; |
||||
rewrite ^/(archives|search|article|links)/?$ /index.php?action=$1 last; |
||||
rewrite ^/(comments|tagslist|trackbacks|article)/?([0-9]+)?/?$ /index.php?action=$1&page=$2 last; |
||||
rewrite ^/tag/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&item=$1&page=$2 last; |
||||
rewrite ^/archives/([0-9]+)/?([0-9]+)?/?$ /index.php?action=show&id=$1&page=$2 last; |
||||
rewrite ^/rss/([0-9]+)?/?$ /rss.php?cid=$1 last; |
||||
rewrite ^/rss/([^/]+)/?$ /rss.php?url=$1 last; |
||||
rewrite ^/uid/([0-9]+)/?([0-9]+)?/?$ /index.php?action=article&uid=$1&page=$2 last; |
||||
rewrite ^/user/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&user=$1&page=$2 last; |
||||
rewrite sitemap.xml sitemap.php last; |
||||
rewrite ^(.*)/([0-9a-zA-Z\-\_]+)/?([0-9]+)?/?$ $1/index.php?action=show&alias=$2&page=$3 last; |
||||
} |
@ -0,0 +1,11 @@ |
||||
location / { |
||||
rewrite ^/frim/index(.+?)\.html$ /list/index.php?$1 last; |
||||
rewrite ^/movie/index(.+?)\.html$ /detail/index.php?$1 last; |
||||
rewrite ^/play/([0-9]+)-([0-9]+)-([0-9]+)\.html$ /video/index.php?$1-$2-$3 last; |
||||
rewrite ^/topic/index(.+?)\.html$ /topic/index.php?$1 last; |
||||
rewrite ^/topiclist/index(.+?).html$ /topiclist/index.php?$1 last; |
||||
rewrite ^/index\.html$ index.php permanent; |
||||
rewrite ^/news\.html$ news/ permanent; |
||||
rewrite ^/part/index(.+?)\.html$ /articlelist/index.php?$1 last; |
||||
rewrite ^/article/index(.+?)\.html$ /article/index.php?$1 last; |
||||
} |
@ -0,0 +1,5 @@ |
||||
location / { |
||||
if (!-e $request_filename) { |
||||
rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last; |
||||
} |
||||
} |
@ -0,0 +1,16 @@ |
||||
location / { |
||||
set $replace 'tmplate_replace'; |
||||
set $spider_request '0'; |
||||
|
||||
if ($http_user_agent ~* '(baiduspider|360sipder|Sogou Orion spider|Sogou News Spider|Sogou blog|Sogou spider2|Sogou inst spider|Sogou web spider|Sogou spider|trendiction|Yahoo|semrush|Toutiao|Google|qihoobot|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|MSNBot|ia_archiver|Tomato Bot)') { |
||||
set $spider_request '1'; |
||||
} |
||||
|
||||
if ($spider_request = '0' ) { |
||||
set $replace 'tmplate_replace'; |
||||
} |
||||
|
||||
sub_filter 'tmplate_replace' $replace; |
||||
sub_filter_once on; |
||||
sub_filter_types *; |
||||
} |
@ -0,0 +1,5 @@ |
||||
location / { |
||||
if (!-e $request_filename){ |
||||
rewrite ^(.*)$ /index.php?s=$1 last; break; |
||||
} |
||||
} |
@ -0,0 +1,13 @@ |
||||
location / { |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /index.php$1 last; |
||||
} |
||||
} |
||||
|
||||
# 不需要,可以删除 |
||||
location /typecho/ { |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /typecho/index.php$1 last; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,15 @@ |
||||
location /{ |
||||
if (!-e $request_filename) { |
||||
rewrite ^(.*)$ /index.php/$1 last; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
location /ws { |
||||
proxy_redirect off; |
||||
proxy_pass http://127.0.0.1:34861; |
||||
proxy_http_version 1.1; |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
proxy_set_header Connection "upgrade"; |
||||
proxy_set_header Host $http_host; |
||||
} |
@ -0,0 +1,34 @@ |
||||
|
||||
#upstream webservers { |
||||
# server 0.0.0.0:5000 weight=1; |
||||
#} |
||||
|
||||
location / { |
||||
try_files $uri $uri/ /index.html; |
||||
add_header access-control-allow-origin *; |
||||
} |
||||
|
||||
location ^~ /api/ { |
||||
add_header access-control-allow-origin *; |
||||
proxy_pass http://webservers; |
||||
proxy_set_header X-Forwarded-Host $host:$server_port; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header Origin $host:$server_port; |
||||
proxy_set_header Referer $host:$server_port; |
||||
} |
||||
|
||||
location ^~ /socket.io/ { |
||||
add_header access-control-allow-origin *; |
||||
proxy_pass http://webservers; |
||||
proxy_set_header X-Forwarded-Host $host:$server_port; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header Origin $host:$server_port; |
||||
proxy_set_header Referer $host:$server_port; |
||||
proxy_set_header Host $http_host; |
||||
proxy_set_header X-NginX-Proxy true; |
||||
|
||||
# WebScoket Support |
||||
proxy_http_version 1.1; |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
proxy_set_header Connection "upgrade"; |
||||
} |
@ -0,0 +1,16 @@ |
||||
location / { |
||||
|
||||
if (!-e $request_filename) { |
||||
rewrite ^/contact/$ /./contact.php last; |
||||
rewrite ^/status$ /./pages.php?cate=$1&page=status last; |
||||
rewrite ^/act$ /./pages.php?cate=$1&page=actindex last; |
||||
rewrite ^/(\w+)/(\w+)/$ /./pages.php?cate=$1&page=$2 last; |
||||
rewrite ^/cart/(\w+)$ /./cart.php?a=$1 last; |
||||
rewrite ^/console$ /./clientarea.php last; |
||||
rewrite ^/sitemap.xml$ /./sitemap.php last; |
||||
rewrite ^/console/(\w+)$ /./clientarea.php?action=services&group=$1 last; |
||||
rewrite ^/console/ec/([0-9]+)$ /./clientarea.php?action=productdetails&id=$1 last; |
||||
rewrite ^/console/ec/(\w+)$ /./clientarea.php?action=services&group=ec&page=$1 last; |
||||
rewrite ^ /index.php last; |
||||
} |
||||
} |
@ -0,0 +1,16 @@ |
||||
location / { |
||||
if (!-e $request_filename) { |
||||
rewrite ^/index.html$ /index.php last; |
||||
rewrite ^/top/index.html$ /module/novel/topindex.php last; |
||||
rewrite ^/(\d*)/list/(\d*).html$ /module/novel/type.php?tid=$1&page=$2 last; |
||||
rewrite ^/(.*?)/(.*?)/info.html$ /module/novel/info.php?tid=$1&nid=$2 last; |
||||
rewrite ^/(.*?)/(.*?)/read/(\d*).html$ /module/novel/read.php?tid=$1&nid=$2&cid=$3 last; |
||||
rewrite ^/(.*?)/(.*?)/menu/(\d*).html$ /module/novel/menu.php?tid=$1&nid=$2&page=$3 last; |
||||
rewrite ^/search/(\d*)/(.*?)/(\d*).html$ /module/novel/search.php?type=$1&key=$2&page=$3 last; |
||||
|
||||
rewrite ^/(\d*)/list/(\d*)_(\d*)_(\d*)_(\d*)_(\d*)_(\d*)_(\d*)_(\d*).html$ /module/novel/type.php?tid=$1&page=$9&process=$2&word=$3&chapter=$4©=$5&cost=$6&letter=$7&order=$8 last; |
||||
|
||||
rewrite ^/top/list/(\d*)/(\d*)/(\d*).html$ /module/novel/toplist.php?tid=$1&dtype=$2&page=$3 last; |
||||
break; |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
location / { |
||||
index index.html index.php; |
||||
if (-f $request_filename/index.html){ |
||||
rewrite (.*) $1/index.html break; |
||||
} |
||||
if (-f $request_filename/index.php){ |
||||
rewrite (.*) $1/index.php; |
||||
} |
||||
if (!-f $request_filename){ |
||||
rewrite (.*) /index.php; |
||||
} |
||||
} |
||||
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent; |
@ -0,0 +1,11 @@ |
||||
location / { |
||||
if (-f $request_filename/index.html){ |
||||
rewrite (.*) $1/index.html break; |
||||
} |
||||
if (-f $request_filename/index.php){ |
||||
rewrite (.*) $1/index.php; |
||||
} |
||||
if (!-f $request_filename){ |
||||
rewrite (.*) /index.php; |
||||
} |
||||
} |
@ -0,0 +1,53 @@ |
||||
server |
||||
{ |
||||
# reuseport 只能在一个server出现一次 |
||||
listen {$PORT}; |
||||
listen [::]:{$PORT}; |
||||
server_name {$SERVER_NAME}; |
||||
index index.php index.html index.htm default.php default.htm default.html; |
||||
root {$ROOT_DIR}; |
||||
|
||||
#SSL-START |
||||
#error_page 404/404.html; |
||||
#SSL-END |
||||
|
||||
#301-START |
||||
|
||||
#PROXY-START |
||||
|
||||
#ERROR-PAGE-START |
||||
#error_page 404 /404.html; |
||||
#error_page 502 /502.html; |
||||
#ERROR-PAGE-END |
||||
|
||||
#PHP-INFO-START |
||||
include {$PHP_DIR}/conf/enable-php-{$PHPVER}.conf; |
||||
#PHP-INFO-END |
||||
|
||||
#REWRITE-START |
||||
include {$OR_REWRITE}/{$SERVER_NAME}.conf; |
||||
#REWRITE-END |
||||
|
||||
#禁止访问的文件或目录 |
||||
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) |
||||
{ |
||||
return 404; |
||||
} |
||||
|
||||
#一键申请SSL证书验证目录相关设置 |
||||
location ~ \.well-known{ |
||||
allow all; |
||||
} |
||||
|
||||
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css|ttf|woff2)$ |
||||
{ |
||||
expires 30d; |
||||
access_log /dev/null; |
||||
if ($invalid_referer){ |
||||
return 404; |
||||
} |
||||
} |
||||
|
||||
access_log {$LOGPATH}/{$SERVER_NAME}.log main; |
||||
error_log {$LOGPATH}/{$SERVER_NAME}.error.log; |
||||
} |
@ -0,0 +1,48 @@ |
||||
|
||||
#BINDING-{$DIRBIND}-START |
||||
server |
||||
{ |
||||
listen {$PORT}; |
||||
server_name {$DIRBIND}; |
||||
index index.php index.html index.htm default.php default.htm default.html; |
||||
root {$ROOT_DIR}; |
||||
|
||||
#SSL-START |
||||
#error_page 404/404.html; |
||||
#SSL-END |
||||
|
||||
#ERROR-PAGE-START |
||||
#error_page 404 /404.html; |
||||
#error_page 502 /502.html; |
||||
#ERROR-PAGE-END |
||||
|
||||
#PHP-INFO-START |
||||
include {$PHP_DIR}/conf/enable-php-{$PHPVER}.conf; |
||||
#PHP-INFO-END |
||||
|
||||
#REWRITE-START |
||||
include {$OR_REWRITE}/{$SERVER_MAIN}.conf; |
||||
#REWRITE-END |
||||
|
||||
#禁止访问的文件或目录 |
||||
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) |
||||
{ |
||||
return 404; |
||||
} |
||||
|
||||
#一键申请SSL证书验证目录相关设置 |
||||
location ~ \.well-known{ |
||||
allow all; |
||||
} |
||||
|
||||
location ~ .*\\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ |
||||
{ |
||||
error_log /dev/null; |
||||
access_log /dev/null; |
||||
expires 30d; |
||||
} |
||||
|
||||
access_log {$LOGPATH}/{$SERVER_MAIN}_{$DIRBIND}.log; |
||||
error_log {$LOGPATH}/{$SERVER_MAIN}_{$DIRBIND}.error.log; |
||||
} |
||||
#BINDING-{$DIRBIND}-END |
@ -0,0 +1,23 @@ |
||||
server |
||||
{ |
||||
listen {$PORT}; |
||||
listen [::]:{$PORT}; |
||||
|
||||
server_name {$SERVER_NAME}; |
||||
index index.php index.html index.htm default.php default.htm default.html; |
||||
|
||||
#SSL-START |
||||
#error_page 404/404.html; |
||||
#SSL-END |
||||
|
||||
#PROXY-START |
||||
location ^~ / { |
||||
proxy_pass http://0.0.0.0:{$PANAL_PORT}/; |
||||
proxy_http_version 1.1; |
||||
proxy_set_header Upgrade $http_upgrade; |
||||
proxy_set_header Connection 'upgrade'; |
||||
} |
||||
#PROXY-END |
||||
|
||||
error_log {$LOGPATH}/{$SERVER_NAME}.error.log; |
||||
} |
Loading…
Reference in new issue