问题:tomcat端口80,nginx端口监听80端口,
#server {
listen 80;
server_name localhost;
nginx启动提示端口占用,不能启动问题。
第一步:首先修改tomcat端口,如改为8089
第二步:修改nginx配置文件 nginx.conf
修改nginx.conf内容:
server {
listen 80;
server_name localhost;
location /text/web {
proxy_pass https://192.168.3.2:8081/xxx数据请求地址
}
location /test {
proxy_pass https://localhost:8089/tomcat系统请求地址
}
然后就可以重新启动tomcat和nginx。