-----Original Message-----
From: Shahed Ali <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Friday, December 01, 2000 11:33 AM Subject: Virtual Hosts and Context Path Question I am running Apache Stronghold with Virtual
Hosts and Tomcat 3.1
Now when I go to http://www.a.com I want my DoucmentRoot to point to
/usr/local/jakarta-tomcat/webapps/A_APP/index.jsp
But I also have to modify the Context Path =
"" in server.xml to point to webapps/MYAPP
Now suppose I want http://www.b.com to point to
/usr/local/jakarta-tomcat/webapps/B_APP/index.jsp, I would need
to also set the Context path = ""
?
How can I go about doing this ?
OR
Or If I have virtual hosts using the same Tomcat
Server, then do I need to keep all my jsp stuff in different contexts and
Set up an alias in each virtual host = Context
Path ?
So when I want to serve up jsp pages for site A I say http://www.a.com/siteAjsp/myapp.jsp
And when I want to serve up jsp pages for site B I say http://www.b.com/siteBjsp/myapp.jsp
Where siteAjsp , siteBjsp etc all have to be unique
aliases/context-paths combinations. Eg
NameVirtualHost 192.168.5.100
<Virtual Host 192.168.5.100>
ServerName www.a.com
DocumentRoot "/home/a"
Alias /siteAjsp
"/usr/local/jakarta/tomcat/webapps/siteAjsp"
ApJServMount /siteAjsp/servlet /siteAjsp
<Location /siteAjsp/WEB-INF>
.....
</Location>
</Virtual
Host>
<<<<<<<<<<<< For this Host in server.xml
Context path="/siteAjsp" docbase =
"webapps/siteAjsp"
<Virtual Host 192.168.5.100>
ServerName www.b.com
DocumentRoot "/home/a"
Alias /siteBjsp
"/usr/local/jakarta/tomcat/webapps/siteBjsp"
ApJServMount /siteBjsp/servlet /siteBjsp
<Location /siteAjsp/WEB-INF>
.....
</Location>
</Virtual
Host>
<<<<<<<<<<<< For this Host in server.xml
Context path="/siteBjsp" docbase =
"webapps/siteBjsp"
Thanks
Shahed |
- Re: Fw: Virtual Hosts and Context Path Question Shahed Ali
- Re: Fw: Virtual Hosts and Context Path Question Paul Frieden