• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Apache/Tomcat on a URL other than localhost

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have successfully got Apache 2.0.47 and Tomcat 4.1.27 working together (using mod_jk 2.0.46). Coolio! It I test from the server itself using http://localhost/examples it works. I was stoked.
Now, if I try to attach to the server from "outside" using it's proper domain, I get a 404. For example: http://www.abc.com/examples. So, I created a virtual host mapping in Tomcat's server.xml, restarted Tomcat so it would re-generate the automatic mod_jk.conf, then restarted Apache, but to no avail. The last step was to remove the default localhost Host section in my Tomcat's server.xml and just leave in my www.abc.com section, but again, it didn't work.
I'm sure I'm missing something in Apache (I have played with it's virtual hosting facility because it's only serving one domain on one IP address). Can anyone help?
Cheers!
Andy (UK)
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you post relevant sections of your httpd.conf and server.xml

I'd recommend not using the auto-conf capabilities, but rather manually configuring the jk connectors (even though those auto-conf are easy).
 
Andy Deighton
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
httpd.conf
ServerName www.ictsqt.co.uk:80
Include c:/tomcat4127/conf/auto/mod_jk.conf
(no virtual host section at all)
mod_jk.conf (a fair chunk of it)
########## Auto generated on Wed Oct 29 21:30:15 GMT 2003##########
<IfModule !mod_jk.c>
LoadModule jk_module c:/apache/Apache2/modules/mod_jk_2.0.46.dll
</IfModule>
JkWorkersFile "c:/tomcat4127/conf/jk/workers.properties"
JkLogFile "c:/tomcat4127/logs/mod_jk.log"
JkLogLevel emerg
<VirtualHost www.ictsqt.co.uk>
ServerName www.ictsqt.co.uk
#################### www.ictsqt.co.uk:/admin ####################
# Static files
Alias /admin "C:/tomcat4127/webapps/../server/webapps/admin"
<Directory "C:/tomcat4127/webapps/../server/webapps/admin">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>

# Deny direct access to WEB-INF and META-INF
#
<Location "/admin/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/admin/META-INF/*">
AllowOverride None
deny from all
</Location>
#
# Use Directory too. On Windows, Location doesn't work unless case matches
#
<Directory "C:/tomcat4127/webapps/../server/webapps/admin/WEB-INF/">
AllowOverride None
deny from all
</Directory>
<Directory "C:/tomcat4127/webapps/../server/webapps/admin/META-INF/">
AllowOverride None
deny from all
</Directory>
JkMount /admin/j_security_check ajp13
JkMount /admin/*.do ajp13
JkMount /admin/*.jsp ajp13
#################### www.ictsqt.co.uk:/hotelform ####################
# Static files
Alias /hotelform "C:/tomcat4127/webapps/hotelform"
<Directory "C:/tomcat4127/webapps/hotelform">
Options Indexes FollowSymLinks
DirectoryIndex Login.jsp
</Directory>

# Deny direct access to WEB-INF and META-INF
#
<Location "/hotelform/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/hotelform/META-INF/*">
AllowOverride None
deny from all
</Location>
#
# Use Directory too. On Windows, Location doesn't work unless case matches
#
<Directory "C:/tomcat4127/webapps/hotelform/WEB-INF/">
AllowOverride None
deny from all
</Directory>
<Directory "C:/tomcat4127/webapps/hotelform/META-INF/">
AllowOverride None
deny from all
</Directory>
JkMount /hotelform/*.jsp ajp13
JkMount /hotelform/*.action ajp13
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic