I have run into a problem. I do both pHp development and JSF development. But i ran into a problem. You see, a while ago I installed Apache2 so that I could do pHp. But then a month later I had to install Apache Tomcat. That’s when the problem arose. I followed all the instruction give on the tomcat.apache.org site for Ubuntu. It did not install. And 127.0.0.1 always pointed to Apache2’s page. I tried 127.0.0.1:8080 but that did not return anything.
So I am here to ask you if there is anyway I can turn off Apache2 when i want to work with Tomcat? And turn it back on whenever I want?
The two servers should be configured to listen on different ports if you want them both available on the same host.
Now, if you’ve configured Apache to listen on 80 and Tomcat to listen on port 8080, you should be able to access them at http://localhost:80 (or just http://localhost) and http://localhost:8080 respectively.
You should ensure both the servers are actually up as well.
netstat -npl | grep :8080andnetstat -npl | grep :80should help you identify what processes are bound to these two ports. If the ports are bound but don’t sayjavaorapache2, you’ve got some other process listening on these ports and that’s going to stop the server that tries to bind to that port from starting up.For Apache2, you could also run
service apache2 statusto see what the status is.If however, you want to run both servers bound to the same port( perhaps 80) then as you seem to have guessed, you’ll have to stop the other.
service apache2 stopshutdown.shscript in${CATALINA_HOME}/bini.e. thebindirectory in your Tomcat installation folder.Note
You will [probably] need to execute the commands as root so you’ll need to prefix
sudo.