Hi Connie,

I think the first thing you should do is read the Apache docs on virtual
hosting here:

http://httpd.apache.org/docs/vhosts/index.html

Then go to the archive here:

http://mikal.org/interests/java/tomcat/index.jsp

and do a search on "virtual host jeff" -- this will pull up all my previous
posts on virtual hosting, including examples of my config.

Thanks,
--jeff

----- Original Message -----
From: "Connie Chan" <[EMAIL PROTECTED]>
To: "Jack Hui" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 6:04 AM
Subject: RE: apache + tomcat + virtual hosts


> Jack,
>
> I try a few configuration settings:
>
> Configuration 1:
> I put the default server name in the NameVirtualHost and then create the
> virutal host tag for the virtual host <VirtualHost defaultServerName>
> .... </VirtualHost>.  It does not work.  When I browse the default web
> server, the virtual host displays.
>
> Configuration 2:
> I put the default server name in the NameVirtualHost and then create the
> virutal host tag for the default server <VirtualHost defaultServerName>
> .... </VirtualHost> and the virtual host <VirtualHost defaultServerName>
> .... </VirtualHost>.  It does not work.  When I browse the default web
> server, I get 403 Forbidden error (The error displays You don't have
> permission to access / on this server).
>
> Configuration 3:
> I put '*' in the NameVirtualHost and then create the virutal host tags
> for the default server <VirtualHost *> .... </VirtualHost> and the
> virtual host <VirtualHost *> .... </VirtualHost>.  It does not work.
> Both servers give me 403 Forbidden error.
>
>
> Is the configuration 2 correct?  Should I create another server name as
> the default server name and then have different name for my default web
> server?  Please help.
>
> Thanks,
> Connie
>
>
> -----Original Message-----
> From: Jack Hui [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 9:32 PM
> To: '[EMAIL PROTECTED]'; Connie Chan
> Subject: RE: apache + tomcat + virtual hosts
>
>
> Connie,
>
> Your default server and virtual server are using the SAME IP AND SAME
> PORT
> no., right ?
> What did you put in the NameVirtualHost ? should be the IP of the
> default
> server, right ?
>
> According to the documentation, you have to set the IP to either way (
> not
> 100% sure, but I read before )
>
> But, why don't you put your default sever into the virtual host too ??
> If it
> can be only recognize by the NAME
> the client enter in the browser.
>
> Another solution is you are going to set another IP for all virtual
> host,
> but it involves modifying the DNS entries.
>
> Jack
>
> -----Original Message-----
> From: Connie Chan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 9:25 PM
> To: [EMAIL PROTECTED]
> Subject: apache + tomcat + virtual hosts
>
>
> Hi,
> Currently, I'm using apache with tomcat.  I have set up the server such
> that it serves a default web server, ssl server (being set up as a
> virtual host with using port 443), and a virtual host (with using port
> 80).  But the document root for default web server and virtual host is
> mixed up. My virtual host and default web server are using the same IP
> address. When I type the default web server, the welcome file for
> virtual host displays. When I type the virtual host, the welcome file
> for the virtual host displays as well. However, if I specify port 8080
> (the HTTP port for tomcat) in the url (for testing tomcat only without
> going thru apache), the default web url would display the correct
> welcome page.
> In my httpd.conf, I have declared
> DocumentRoot d:/jakarta-tomcat/webapps/myapp
> AND
> <VirtualHost dev.mycomp.com:80>
> ServerName vh1.mycomp.com
> DocumentRoot d:/jakarta-tomcat/webapps/vh1
> JkMount /*.jsp ajp12
> JkMount /servlet/* ajp12
> JkMount /email/* ajp12
> <Directory "d:/jakarta-tomcat/webapps/vh1/META-INF/">
> AllowOverride None
> deny from all
> </Directory>
> <Directory "d:/jakarta-tomcat/webapps/vh1/WEB-INF/">
> AllowOverride None
> deny from all
> </Directory>
> </VirtualHost>
>
> Do I miss anything?
>
> Thanks,
> Connie
>

Reply via email to