starting tomcat on port 80 on CentOS release 5.5 (Final)

前端 未结 6 1619
傲寒
傲寒 2021-02-05 15:17

I want to start Tomcat 6.0.29 on port 80. My OS is CentOS release 5.5 (Final) I changed following line in $TOMCAT_HOME/conf/server.xml



        
6条回答
  •  迷失自我
    2021-02-05 15:44

    i use nginx 2 bind 80 to 8080 which is the port that tomcat bind to.

    my nginx configure is like this:

    { server

    listen 80;
       #which you can edit in /etc/hosts file.It can bind mydomain.com to 127.0.0.1
    server_name mydomain.com; 
    location / {
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080;
    }
    access_log logs/xxx456.tk_access.log;
    

    }

提交回复
热议问题