V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
ciki
V2EX  ›  NGINX

nginxconfig.io 生成的配置没法正确运行啊

  •  
  •   ciki · 2021-10-12 17:59:26 +08:00 · 1287 次点击
    这是一个创建于 1172 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我的需求是通过 nignx 反代多个 docker 里运行的不同端口 server,同时 nginx 还当静态服务器支撑几个 vue 的前端项目。目前的做法是通过负载均衡来实现反代,但是静态服务配置超过两个就会导致无法访问。所以用 nginxconfig.io 去生成了一个配置对比看看,发现它的配置比较呆板,而且放到服务器后访问会直接拒绝。
    GTim
        1
    GTim  
       2021-10-12 19:06:42 +08:00
    贴出你的配置,我来帮你解决
    ciki
        2
    ciki  
    OP
       2021-10-13 10:14:33 +08:00
    @GTim https://www.digitalocean.com/community/tools/nginx#?domains.0.server.domain=api.mydomain.com&domains.0.server.documentRoot=&domains.0.server.redirectSubdomains=false&domains.0.https.certType=custom&domains.0.https.sslCertificate=%2Fetc%2Fnginx%2Fcerts%2Fapi.mydomain.com%2Fcert.pem&domains.0.https.sslCertificateKey=%2Fetc%2Fnginx%2Fcerts%2Fapi.mydomain.com%2Fkey.pem&domains.0.php.php=false&domains.0.reverseProxy.reverseProxy=true&domains.0.reverseProxy.proxyPass=http%3A%2F%2F127.0.0.1%3A8088&domains.0.routing.index=index.html&domains.0.routing.fallbackHtml=true&domains.0.routing.fallbackPhp=false&domains.0.logging.accessLog=true&domains.0.logging.errorLog=true&domains.1.server.domain=dev-api.mydomain.com&domains.1.server.documentRoot=&domains.1.server.redirectSubdomains=false&domains.1.https.certType=custom&domains.1.https.sslCertificate=%2Fetc%2Fnginx%2Fcerts%2Fdev-api.mydomain.com%2Fcert.pem&domains.1.https.sslCertificateKey=%2Fetc%2Fnginx%2Fcerts%2Fdev-api.mydomain.com%2Fkey.pem&domains.1.php.php=false&domains.1.reverseProxy.reverseProxy=true&domains.1.reverseProxy.proxyPass=http%3A%2F%2F127.0.0.1%3A8080&domains.1.routing.index=index.html&domains.1.routing.fallbackHtml=true&domains.1.routing.fallbackPhp=false&domains.1.logging.accessLog=true&domains.1.logging.errorLog=true&domains.2.server.domain=admin.mydomain.com&domains.2.server.path=%2Fdata%2Fwww%2Fadmin.mydomain.com&domains.2.server.documentRoot=%2F&domains.2.server.redirectSubdomains=false&domains.2.https.certType=custom&domains.2.https.sslCertificate=%2Fetc%2Fnginx%2Fcerts%2Fadmin.mydomain.com%2Fcert.pem&domains.2.https.sslCertificateKey=%2Fetc%2Fnginx%2Fcerts%2Fadmin.mydomain.com%2Fkey.pem&domains.2.php.php=false&domains.2.routing.index=index.html&domains.2.routing.fallbackHtml=true&domains.2.logging.accessLog=true&domains.2.logging.errorLog=true&global.https.ocspCloudflare=false&global.https.ocspGoogle=false&global.https.ocspOpenDns=false&global.https.letsEncryptCertRoot=%2Fetc%2Fnginx%2Fcerts%2F&global.logging.logNotFound=true&global.logging.cloudflare=true&global.logging.xForwardedFor=true&global.logging.trueClientIp=true&global.nginx.user=root&global.app.lang=zhCN
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   957 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:34 · PVG 06:34 · LAX 14:34 · JFK 17:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.