2

求一个 nginx 配置

 2 years ago
source link: https://www.v2ex.com/t/804372
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
求一个 nginx 配置
4 条回复    2021-09-26 15:16:41 +08:00

InDom

InDom   13 小时 50 分钟前

盲写的哈,不知道对不对。

location ~ ^/html/2016/(news|health)/ {
return 403;
}

mxm145

mxm145   13 小时 47 分钟前

关键是需要屏蔽的栏目很多,不可能全写出来,最好是能匹配到可以放行的栏目名就放,其他的一律屏蔽
@InDom

alvinbone88

alvinbone88   13 小时 36 分钟前

location /html/2016/ {
return 403;
}

location /html/2016/ok/ {
// 自定义配置
}

mxm145

mxm145   13 小时 29 分钟前

@alvinbone88 测试确实可以实现,但是要把顺序反过来放,多谢

关于   ·   帮助文档   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   971 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 20ms · UTC 20:45 · PVG 04:45 · LAX 13:45 · JFK 16:45
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK