NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
yuedingwangji
V2EX  ›  NGINX

nginx 配置问题请教

  •  
  •   yuedingwangji · Dec 14, 2017 · 3757 views
    This topic created in 3080 days ago, the information mentioned may be changed or developed.

    假设我的网站是 asp 的,我能做到除了 asp,html,js,css,jpg,gif 等格式的后缀能访问外,其他后缀的都返回 403 么?

    9 replies    2017-12-15 18:06:22 +08:00
    guoer
        1
    guoer  
       Dec 14, 2017 via iPhone   ❤️ 1
    可以的。匹配 location
    mtus
        2
    mtus  
       Dec 14, 2017   ❤️ 4
    在这里测试 location 规则: [Nginx Location Match Visible]( https://detailyang.github.io/nginx-location-match-visible/)
    yuedingwangji
        3
    yuedingwangji  
    OP
       Dec 15, 2017 via Android
    @guoer 怎么配置?
    Lax
        4
    Lax  
       Dec 15, 2017
    Nginx 配置方面可以提供付费咨询,有兴趣的话可以在我资料里找到联系方式
    yuedingwangji
        5
    yuedingwangji  
    OP
       Dec 15, 2017 via Android
    @Lax 价格怎么算
    Trim21
        6
    Trim21  
       Dec 15, 2017 via Android
    @mtus 一直想找一个这样的工具 感谢
    isyu
        7
    isyu  
       Dec 15, 2017
    @mtus #2 感谢,我也很需要这样的工具
    handwork
        8
    handwork  
       Dec 15, 2017
    location ~ .*\.(php|jsp|do|swf){deny all;}
    dorothyREN
        9
    dorothyREN  
       Dec 15, 2017
    正则匹配,非这几个尾巴的 return 一个 403
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5350 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 81ms · UTC 05:53 · PVG 13:53 · LAX 22:53 · JFK 01:53
    ♥ Do have faith in what you're doing.