You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bh...@ThoughtWorks.com on 2001/01/04 02:47:52 UTC
virtual host..
I have tried to setup virtual host with Tomcat but failed. JSP run on
main.somewhere.com but None of the JSP run on the a.somewhere.com virtual
host.
here is my server.xml configuration:
.....
<!-- Virtual host example -
In "127.0.0.1" virtual host we'll reverse "/" and
"/examples"
(XXX need a better example )
(use "http://127.0.0.1/examples" )
<Host name="127.0.0.1" >
<Context path=""
docBase="webapps/examples" />
<Context path="/examples"
docBase="webapps/ROOT" />
</Host>
-->
<Host name="a.somewhere.com" >
<Context path=""
docBase="/home/somewhere/a" />
</Host>
</ContextManager>
</Server>
Here is my httpd.conf.
...
JkWorkersFile
/home/apps/jakarta/jakarta-tomcat-3.2.1/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel warn
<VirtualHost 10.2.1.60>
ServerAdmin www@somewhere.com
DocumentRoot /home/apps/apache-1.3.14/htdocs
CustomLog /home/apps/apache-1.3.14/logs/somewhere.log combined
Servername main.somewhere.com
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
Alias /examples
"/home/apps/jakarta/jakarta-tomcat-3.2.1/webapps/examples"
<Directory
"/home/apps/jakarta/jakarta-tomcat-3.2.1/webapps/examples">
Options Indexes FollowSymLinks
</Directory>
<Directory
"/home/apps/jakarta/jakarta-tomcat-3.2.1/webapps/examples/WEB-INF/">
AllowOverride None
deny from all
</Directory>
<Directory
"/home/apps/jakarta/jakarta-tomcat-3.2.1/webapps/examples/META-INF/">
AllowOverride None
deny from all
</Directory>
</VirtualHost>
<VirtualHost 10.2.1.60>
ServerAdmin www@somewhere.com
DocumentRoot /home/somewhere/a/htdocs
CustomLog /home/apps/apache-1.3.14/logs/somewhere-a.log combined
Servername a.somewhere.com
JkMount /*.jsp ajp13
JkMount /myapp/* ajp13
<Directory "/home/somewhere/a">
Options Indexes FollowSymLinks
</Directory>
<Directory "/home/somewhere/a/WEB-INF">
AllowOverride None
deny from all
</Directory>
<Directory "/home/somewhere//META-INF">
AllowOverride None
deny from all
</Directory>
</VirtualHost>