Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just find out that it is possible to create public webserver through "preference". Is it possible to make this "webserver" to a Apache Tomcat server? I develop in Java/Jsp/Servlet..

I use Lion and I'm new to Mac

share|improve this question

migrated from stackoverflow.com Oct 23 '11 at 17:26

This question came from our site for professional and enthusiast programmers.

2 Answers 2

No. The System Preferences setting only activates Apache HTTP Server.

You can set up Tomcat stand-alone yourself, or configure Apache to use mod_jk to connect to Tomcat as described e.g. here.

share|improve this answer

Yes of course. But the firewall doesn't make it simple nowadays. In earlier versions of OSX you could add a port exception to the firewall, which isn't possible AFAICS. You can install the Waterroof firewall frontend.

http://www.hanynet.com/waterroof/

Another option is to use apache as frontend to tomcat, using Mod_JK.

https://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

A third option, if you don't need Apache, is to make Tomcat listen to port 80, and disable Apache. Enabling the webserver in the firewall does make OSX start the webserver. So you probably should make Apache use another port as well, say port 9090. Then apache starts, when the firewall starts it, and you start tomcat manually.

TOMCAT

Open server.xml

<Connector connectionTimeout="20000" port="8080"

Should be: port="80"

See http://stackoverflow.com/questions/5544713/starting-tomcat-on-port-80-on-centos-release-5-5-final

APACHE

Edit httpd.conf

listen 80

should be: listen 9090

See https://httpd.apache.org/docs/2.0/bind.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.