tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Berry" <elbe...@gmail.com>
Subject Virtual Hosting with Apache and mod_jk
Date Wed, 02 Aug 2006 18:47:15 GMT
Hi all,
   I'm still pretty new to this. I'm trying to set up a home server
for testing and learning purposes, and I'm having some troubles
setting up virtual hosts with Apache and mod_jk.

I have created a virtual host in my httpd.conf:
<VirtualHost *:80>
        DocumentRoot /opt/projects/www/com/townsfolkdesigns/web
        ServerName www.townsfolkdesigns.com
        /*.jsp ajp13
        /*.do ajp13
</VirtualHost>

and set up a host in server.xml:
<Host appBase="/opt/projects/www/com/townsfolkdesigns/web"
name="www.townsfolkdesigns.com">
   <Context docBase="/opt/projects/www/com/townsfolkdesigns/web" path="">
   </Context>
</Host>

This works great when I set up my hosts file to point
www.townsfolkdesigns.com to the correct IP of my server box.

However, if I try to access the server directly by IP, I get a 403
error. If I remove the virtual host, I can access the server directly
and get the default apache page. As I am still learning, I would like
to be able to get to the default apache page so I can read the
documentation as I fiddle around. So my first question is how do I set
it up so I can access my website via www.townsfolkdesigns.com, and
still get to the default apache page via direct IP?

My Second question is in regards to mod_rewrite, I want to be able to
use mod_rewrite to easily host a couple other domains on the same box.
Is there something like this for tomcat? I would like to be able to
declare one Host element (with a simple context element) in the
server.xml and have the requests directed to the correct paths. Is
this possible?

Thanks in advance for any help.
Eric

-- 
Learn from the past. Live in the present. Plan for the future.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message