在这里输入代码我有一个映射多个域的Web应用程序.其中一个域使用SSL而另一个域很简单.我尝试将NGINX用于nodeJs.我的HTTP响应非常慢.请查看conf文件,帮助我摆脱这个问题.upstream myserver {server 127.0.0.1:4502;server 127.0.0.1:4500; }server {listen 0.0.0.0:80;server_name a.myserver.com;access_log /var/log/nginx/nodetest.log;location / {proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $...
我目前正在运行nginx背后的一系列Node.js表达应用程序.但是,虽然我的应用程序运行正常,但我在某些情况下遇到间歇性的502 Bad Gateway错误. 主实例是用户尝试登录的位置.通常第一次登录尝试将返回502错误(并且此错误将是即时的而不是在延迟之后发生),而此后立即的第二次尝试将处理正常,而请求标头中没有变化. 我已经检查了nginx和express的日志,看起来在第一个例子中,尽管细节相同,但第一次尝试返回500错误(如在登录尝试错误的情况下...
upstream app {server localhost:3000; }server {...# If I comment this location out, images are displayed on the websitelocation ~* \.(?:jpg|jpeg|png|gif|swf|xml|txt|css|js)${expires 6004800;add_header Pragma public;add_header Cache-Control "public, must-revalidate, proxy-revalidate";}...location /app {alias /path/to/app/public/; try_files $uri $uri @app;}location @app {rewrite /app(.*) $1 break;pro...