在tengine中整合tomcat. 不知道方法对不对. 都是自己亲自动手做的. 如果有更好的请给我留言
在 nginx/conf 中 新建 web.conf vim web.conf 里面的内容如下.
upstream backend {
ip_hash;
session_sticky;
server 127.0.0.1:8080;
}server {
listen 80;
server_name localhost;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://backend;
}
}
然后在nginx.conf中的http中加入如下的代码
include web.conf;
发表评论
沙发空缺中,还不快抢~