Re: Solved: TC4 + Apache virtual host configuration
I finally got virtual hosting working with Apache and TC4.0, woo hoo! Congratulations! The relevant sections from httpd.conf and server.xml are below. The only downside with this configuration is that I haven't been able to mount webapps in the root context specified by DocumentRoot. Instead I had to create a subdirectory 'site' and put the servlets and JSPs in that. Is there any way to mount the root context? There is a special context and web-app in Servlet Spec. (so in Tomcat as well) called ROOT. I believe you should put your app there and mention something like WebAppDeploy / conn / or maybe WebAppDeploy conn / in your httpd.conf. There can be some problems with slash (/) at the end of URL, so try both http://host; and http://host/; in your browser. But according to specs Tomcat's HTTP Connector is doing a favour to as serving contexts without trailing slash. WARP connector doesn't. I hope it helps. BTW, are my messages can be read, cause I send them in some unusual way? -August Anton -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Solved: TC4 + Apache virtual host configuration
I finally got virtual hosting working with Apache and TC4.0, woo hoo! The relevant sections from httpd.conf and server.xml are below. The only downside with this configuration is that I haven't been able to mount webapps in the root context specified by DocumentRoot. Instead I had to create a subdirectory 'site' and put the servlets and JSPs in that. Is there any way to mount the root context? -August httpd.conf - NameVirtualHost 231.232.123.213 # create the webapp connection WebAppConnection conn warp localhost:8008 WebAppInfo /webapp-info VirtualHost 231.232.123.213 ServerName www.host1.com DocumentRoot /home/host1/www #depl0y webapps for this site WebAppDeploy site conn / /VirtualHost VirtualHost 231.232.123.213 ServerName www.host2.com DocumentRoot /home/host2/www #depl0y webapps for this site WebAppDeploy site conn / /VirtualHost server.xml Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=false acceptCount=10 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=Apache defaultHost=localhost debug=0 !-- appBase=webapps -- !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- host1.com virtual host -- Host name=www.host1.com debug=0 appBase=/home/host1/www unpackWARs=true !-- Access log -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=host1_access_log. suffix=.txt pattern=common/ !-- Context logger -- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host1_log. suffix=.txt timestamp=true/ !-- Define webapps -- !-- Tomcat Root Context -- Context path= docBase=site debug=0/ /Host !-- host2.com virtual host -- Host name=www.host2.com debug=0 appBase=/home/host2/www unpackWARs=true !-- Access log -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=host2_access_log. suffix=.txt pattern=common/ !-- Context logger -- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=host2_log. suffix=.txt timestamp=true/ !-- Define webapps -- !-- Tomcat Root Context -- Context path= docBase=site debug=0/ /Host /Engine /Service /Server __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]