Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Nov 30, 2004 5:45 pm 
Offline
Senior Newbie

Joined: Tue Nov 30, 2004 5:02 pm
Posts: 7
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.


Top
   
 Post subject:
PostPosted: Tue Nov 30, 2004 6:53 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
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


Top
   
 Post subject:
PostPosted: Tue Nov 30, 2004 7:33 pm 
Offline
Senior Newbie

Joined: Tue Nov 30, 2004 5:02 pm
Posts: 7
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.


Top
   
 Post subject: It worked!
PostPosted: Wed Dec 01, 2004 2:42 pm 
Offline
Senior Newbie

Joined: Tue Nov 30, 2004 5:02 pm
Posts: 7
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group