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

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

  •  
  •   ciki · Oct 12, 2021 · 2226 views
    This topic created in 1867 days ago, the information mentioned may be changed or developed.
    我的需求是通过 nignx 反代多个 docker 里运行的不同端口 server,同时 nginx 还当静态服务器支撑几个 vue 的前端项目。目前的做法是通过负载均衡来实现反代,但是静态服务配置超过两个就会导致无法访问。所以用 nginxconfig.io 去生成了一个配置对比看看,发现它的配置比较呆板,而且放到服务器后访问会直接拒绝。
    yemoluo
    yemoluo
    Oct 12, 2021
    1
    贴出你的配置,我来帮你解决
    ciki
    ciki
    OP
    Oct 13, 2021
    2
    @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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3867 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 04:03 · PVG 12:03 · LAX 20:03 · JFK 23:03
    ♥ Do have faith in what you're doing.