Nginx代理非80端口

Nginx通过80端口反向代理到Tomcat实现很简单,通过Jsp的request.getServerPort()获取到的端口号依然是80,而如果Nginx使用非80端口做反响代理时request.getServerPort()获取到的端口号返回依然会是80,这样边无法正确response.sendRedirect

String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+r[……]

继续阅读

nginx新版本配置文件警告 the "log_format" directive may be used only on "http"

使用用新版本nginx的人不会对这个警告陌生吧

[root@kinggoo.com vhost]# /opt/webserver/nginx/sbin/nginx -t
nginx: [warn] the "log_format" directive may be used only on "http" level in /opt/path/nginx/conf/vVVhost/abc.kinggoo.com:38
nginx: the configuration file /opt/path/nginx/conf/nginx[……]

继续阅读

第 1 页,共 1 页1