We have this server.xml file:
<Host name="cntest2.de" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="true"> <Context path="" docBase="/usr/share/tomcat6/webapps/MyNetwork" reloadable="true" allowLinking="true" /> </Host> If we have no path defined (path="") , there are two networks starting (catalina.out - part) INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '' and later (catalina.out - part) INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/CompetenceNetwork' we can access the page by http://cntest2.de/ -> and get redirected to http://cntest2.de/login.html. If we define the path like path="/MyNetwork". <Host name="cntest2.de" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="true"> <Context path="/MyNetwork" docBase="/usr/share/tomcat6/webapps/MyNetwork" reloadable="true" allowLinking="true" /> </Host> And starts only one network: (catalina.out - part) INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/CompetenceNetwork' The page http://cntest2.de/MyNetwork/login.html works fine. But if we go to the page http://cntest2.de/ the index.html from ROOT is showing. So now we did what you said and copied the MyNetwork content (subfolder and files) to the ROOT directory. Then we see the loginpage of MyNetwork as expected. But now if we try to login we get URL-"redirected" to: http://cntest2.de/pages/#{subUserSessionUtil.startPageAddress} There is no error shown in the catalina.out, but the #{subUserSessionUtil.startPageAddress} looks like an uninterpreted handler call. That works if we access the network with http://cntest2.de:8080/MyNetwork/login.html. The goal is to access the network by its configured URL-pattern -> http://cntest2.de/login.html (and do login etc.) The question: how can we adjust the server.xml and work with url http://cntest2.de/login.html , not with http://cntest2.de/MyNetwork/login.html ? Tnank you //////////////////////////// from apache2: vhost_cn.conf # Update this path to match your conf directory location (put workers.properties next to httpd. # JkWorkersFile /etc/tomcat6/workers.properties # Where to put jk shared memory # Update this path to match your local state directory or logs directory JkShmFile /var/log/apache2/mod_jk.shm # Where to put jk logs #mmm: JkWorkersFile /usr/share/tomcat6/conf/worker.properties # # Update this path to match your logs directory location (put mod_jk.log next to access_log) JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # Select the timestamp log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " NameVirtualHost * <VirtualHost *> DocumentRoot /usr/share/tomcat6/webapps/MyNetwork . JkMount /* worker1 .. # Serve html, jpg and gif using httpd JkUnMount /*.html ajp13 JkUnMount /*.jpg ajp13 JkUnMount /*.gif ajp13 ServerName cntest2.de ServerAdmin i...@cntest2.de <Directory "/usr/share/tomcat6/webapps/MyNetwork"> Options Indexes MultiViews AllowOverride none Allow from all </Directory> <Location "/WEB-INF/"> #AllowOverride None deny from all </Location> #RewriteEngine On Options +FollowSymLinks ///////////////////////////////// n828cl wrote: > >> From: M.Arkhypov [mailto:mykhaylo.arkhy...@gmx.net] >> Subject: How to start my application without localhost, only with >> virtiual host ? > >> I would like to start my application without localhost, >> only with virtiual host. > > All <Host> elements are virtual. The name "localhost" in the <Engine> and > one <Host> element has nothing to do with 127.0.0.1, but rather it simply > links the <Engine> to the default <Host>. You must always have one > default <Host>, but it can be any of your <Host> elements. > >> <Host name="mmmtest.ch" >> unpackWARs="true" autoDeploy="true" >> xmlValidation="false" xmlNamespaceAware="true"> >> <Alias>mmmtest.ch</Alias> > > You're missing the appBase attribute; the value for that should be unique > for each <Host>. > > That's a pointless <Alias>, since it's the same as the name attribute. > >> <Context path="" >> docBase="c:/temp_mmm/apache-tomcat-6.0.29/webapps/examples" >> reloadable="true" allowLinking="true" > >> </Context> > > It's extremely bad practice to put <Context> elements in server.xml, and > very dangerous to share webapps across multiple <Host> elements. > >> The tomcatmanager is reachable on: >> http://mmmtest.ch:8080/manager/html. > > Only because both <Host> elements are sharing appBase - a really bad idea. > >> <Host name="pcd-testcommunity.de" >> unpackWARs="true" autoDeploy="true" >> xmlValidation="false" xmlNamespaceAware="true"> >> <Alias>pcd-testcommunity.de</Alias> > > Another useless <Alias>. > >> <Context path="" >> docBase="/var/lib/tomcat55/webapps/CompetenceNetwork" >> reloadable="true" allowLinking="true" > >> </Context> > > Another undesirable location for a <Context> element. The webapp should > be renamed to ROOT, and the <Context> element placed in > /var/lib/tomcat55/webapps/ROOT/META-INF/context.xml, and the path > attribute removed. > >> How can I work with tomcatmanager with these configurations? > > You must place a copy of the manager webapp in each <Host>'s appBase > directory. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact the sender and delete the e-mail > and its attachments from all computers. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://old.nabble.com/How-to-start-my-application-without-localhost%2C-only-with-virtiual-host---tp30068006p30087000.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org