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

nginx 反代 DOH 之后,怎么修改源网站返回的默认页面

  •  
  •   sereinfy · Apr 28, 2024 · 2089 views
    This topic created in 767 days ago, the information mentioned may be changed or developed.

    请问我用 nginx 反代 DOH 之后,浏览器访问 url/dns-query 会返回一个 Bad Request 字符 这应该是个 html 吧 使用这个吗

    ​ root / ​ index

    还是 error_page

    我自己试了很多遍都不行,刚开始学 应该用哪个命令

    Ipsum
        1
    Ipsum  
       Apr 29, 2024 via Android
    stream 应该可以,https 应该不行。
    baobao1270
        2
    baobao1270  
       Apr 29, 2024 via Android
    location / { 你的页面 }
    location /dns-query { 反向代理 }
    daimaosix
        3
    daimaosix  
       May 2, 2024 via Android
    1.判断当 uri 等于字符串/dns-query 时返回你自定义页面
    2.判断没有带指定参数时返回你自定义页面
    两种办法都可以
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2835 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 12:58 · PVG 20:58 · LAX 05:58 · JFK 08:58
    ♥ Do have faith in what you're doing.