Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


Getting tomcat (or equiv) to run on port 80...

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux, Apache, Mysql and PHP (LAMP) Forum
Author Message
toast



Joined: 30 Nov 2004
Posts: 7

Posted: Tue Nov 30, 2004 4:45 pm    Post subject: Getting tomcat (or equiv) to run on port 80...  

Hello fellow linode users,

I have been trying to get Jetty (Tomcat clone) to work along side Apache on port 80, so I can host a blog (pebble) on my linode with the address of “domain/blog” instead of “domain:8080/blog/”. I haven’t had any luck so far, here is my setup

Debian Linux 3.0, Apache 1.3.26, Jetty 4.2.22 and Mod_JK 3.3a-4

My understanding is the mod_jk Apache module should give me this functionality but with mod_jk enabled, Apache wont start, the following error is generated in error.log:

Code: [emerg] (2)No such file or directory: Error while opening the workers

I have modified httpd.conf with these additions, I have tried numerous combinations as well, none work:

Code: LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so
AddModule     mod_jk.c
JkWorkersFile /etc/apache/workers.properties
Include /etc/apache/conf/mod_jk.conf

I can list the workers.properties and mod_jk.conf files, if it will help, it doesn’t seem to make any difference what I put in them but I wonder if I need to change the permissions on these files, this is how it’s setup at the moment –

Code: -rw-r--r--    1 root     root          245 Nov 26 14:06 workers.properties
-rw-r--r--    1 root     root          110 Nov 26 05:28 mod_jk.conf

If anyone has any suggestions on how I might fix this, it would be very welcome, as after spending 2 or 3 days on this issue, I pretty much gave up, along with the idea of hosting a blog.
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2404
Location: Galloway, NJ

Posted: Tue Nov 30, 2004 5:53 pm    Post subject:  

Check out the reverse-proxy functionality of Apache's mod_proxy module.

http://httpd.apache.org/docs/mod/mod_proxy.html

For example:

Code: ProxyRequests Off

ProxyPass /blog http://127.0.0.1:8080/blog
ProxyPassReverse /blog http://127.0.0.1:8080/blog
(careful with those trailing slashes)

Reverse proxy even allows you to proxy remote sites .. so I could have linode.com/google/ bring up google.com for example :)

-Chris
Back to top  
toast



Joined: 30 Nov 2004
Posts: 7

Posted: Tue Nov 30, 2004 6:33 pm    Post subject:  

Thanks Chris, I'll give that a try, it certainly sounds simpler than mod_jk. I would still be interested to know if anyone has had better luck with the mod_jk module, than me, as well.
Back to top  
toast



Joined: 30 Nov 2004
Posts: 7

Posted: Wed Dec 01, 2004 1:42 pm    Post subject: It worked!  

Sorry to reply to my own thread again but I just wanted to let you know mod_proxy worked exactly as you described. I even copied and pasted your code straight into httpd.conf after enabling the module, it doesn't get any eaiser than that :D

Going back to the jetty FAQ I can see they mentioned mod_proxy but I didn't really take it in and tried mod_jk instead.
Back to top  
 
       Linode.com Forum Forum Index -> Linux, Apache, Mysql and PHP (LAMP) Forum
Page 1 of 1