Redirect port 80 to port 8080 for Tomcat
2014-11-05 00:00
597 查看
摘要: By default Tomcat’s HTTP connector listens on port 8080. Changing to port 80 in Linux environment is a tricky issue, since by default listening on any port under 1024 require a privileged user, and for security considerations it is not recommended to run Tomcat with elevated permissions. We can u...
By default Tomcat’s HTTP connector listens on port 8080. Changing to port 80 in Linux environment is a tricky issue, since by default listening on any port under 1024 require a privileged user, and for security considerations it is not recommended to run Tomcat with elevated permissions. We can use iptables to achieve this.
By default Tomcat’s HTTP connector listens on port 8080. Changing to port 80 in Linux environment is a tricky issue, since by default listening on any port under 1024 require a privileged user, and for security considerations it is not recommended to run Tomcat with elevated permissions. We can use iptables to achieve this.
# open 80 port sudo iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT # open 8080 port sudo iptables -A INPUT -i eth0 -p tcp --dport 8080 -j ACCEPT # redirect port 80 to port 8080 sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 # save iptables rules sudo service iptables save # make iptables auto start after reboot sudo chkconfig --add iptables
相关文章推荐
- Change tomcat port number from 8080 to 80
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- nginx redirect to gunicorn for Django or Jetty/Tomcat
- 启用Tomcat时,报异常:failed to connect to localhost/127.0.0.1 (port 8080)
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080 .
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- tomcat 大并发报错 Maximum number of threads (200) created for connector with address null and port 8080
- tomcat "Unable to compile class for JSP" 错误解决方案
- Apache Address already in use: make_sock: could not bind to port 80 or 443 error and solution
- Port 8080 required by Tomcat v6.0 Server at localhost is already in use. The server may already be r
- Unable to find Mach task port for process-id 28860: (os/kern) failure (0x5).
- 解决方案:Unable to retrieve the URL endpoint for Service/Port
- Address already in use: make_sock: could not bind to port 80/443
- Redirect Apache Request to Tomcat
- How to check port number is open for a windows server
- Running Tomcat on Port 80 via a Service Wrapper