Hello, yesterday I set up exactly what you need You need to set up 2 "services", and inside define your hosts and connectors. So here my server.xml:
<Server port="8005" shutdown="SHUTDOWN" debug="0"> <Service name="inst1"> <Connector port="8180" minProcessors="5" maxProcessors="75" useBodyEncodingForURI="true" enableLookups="true" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" useURIValidationHack="false" disableUploadTimeout="true" /> <Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> <Engine name="Standalone" defaultHost="localhost" debug="0"> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="www.example.com." suffix=".txt" timestamp="true" /> <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" /> </Host> </Engine> </Service> <Service name="inst2"> <Connector port="8181" minProcessors="5" maxProcessors="75" useBodyEncodingForURI="true" enableLookups="true" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" useURIValidationHack="false" disableUploadTimeout="true" /> <Connector port="8010" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> <Engine name="Standalone" defaultHost="localhost2" debug="0"> <Host name="localhost2" debug="0" appBase="/home/tomcat/yourapp" unpackWARs="true" autoDeploy="true"> <Logger className="org.apache.catalina.logger.FileLogger" directory="/home/tomcat/yourapp/logs" prefix="www.example.com2." suffix=".txt" timestamp="true" /> <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" /> </Host> </Engine> </Service> </Server> This makes you 2 tomcats, one on loaclhost:8180 and the other on loaclhost:8181, with different folders in the filesystem where the webapps are deployed, one in /var/lib/tomcat5.5/webapps, and the other in /home/tomcat/yourapp I use tomcat 5.5, but I guess this will work on 6.0 as well. Regards, Yves On Thursday 26 June 2008, dylanmac wrote: > I'd like to configure Tomcat so that I can run multiple dev websites as > root relative and distinguish them via port numbers. In order words, I'd > like to run http://localhost:8080/index.jsp and have that be a different > site (using a different directory) than http://localhost:9800/index.jsp > > The reason this matters to me is because I like running my sites as > root-relative. That way I can reference images, files, etc as, for > example, /images/logo.png rather than having to traverse the directory > structure via "../". This makes the site much more portable and accurately > reflects how the site will run in production anyway (where most sites run > as root). > > So can anyone give me a quick primer on how to configure Tomcat to use > multiple ports for root-relative development? I have spent several hours > researching this with no luck. > > I am currently running Tomcat 6.0 > > Thanks. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]