Now days i am trying to get jetty-spring-hibernate framework running...
Here are the things that i find interesting....
Apache:
How to run apache on a different port?
1. By default Apache runs on port 80.
2. To change the port or add additional listening ports...
nano /etc/apache2/ports.conf
-- change
listen 80
-- to
listen 80
listen 8080
sudo /etc/init.d/apache2 restart
This will make apache listen on 80 and 8080. You can make it listen any other port that you want.
Tomcat:
How to change the port number on which tomcat runs?
Tomcat is a HTTP server and generally HTTP servers are related to port 80 so ideally tomcat should run on port 80 but default port for tomcat is 8080.
The reason for this is that Tomcat is good for handling Java and Jsp / Servlets code but it is not efficient for static page serving and other server side languages.
In some cases overhead of running tomcat on top of apache is poor so we can change default port of tomcat to 80.
To change the port.. We need to server.xml file
Also other way of port handling is to use kernel iptables to forward any request coming on port 80 to forward to port 8080.
No comments:
Post a Comment