On 2/7/2014 1:47 AM, Gaël THEROND wrote:
Hello everyone,

I'm facing a really strange issue since about two or three days now.

I've got a Tomcat Server, which contain a virtualhost like this:

http://pastebin.com/gDBhTTLH

If I start my tomcat instance, everything is fine, tomcat is launching
correctly without error, and correctly create the virtual host under the
${catalina_base}/conf/Catalina/

I can see on the catalina.out log file that tomcat even create the
manager.xml to be able to have an isolated manager for this host.

the manager.xml file is correct.

However, if I try to upload a WAR I'm facing a 403 error coming from tomcat.
Where I didn't get it, it's that on my main manager everything is fine, I
can log in and load a WAR correctly.

I'm sure that the tomcat-users.xml is correct because if it was not I would
not be able to load/start a WAR on the main manager.

Of course, all directory and path are owned by the tomcat user and the
tomcat itself is launch with this user.

The weird thing, is that sometimes, I can upload the WAR correctly without
403 error but then I can't start the application resulting of another 403
error.

If any futher informations are needed, let me know, I'll provide them as
soon as possible.

Cheers and thanks for any help!


From your server.xml:

<Host name="tomcat"  appBase="webapps/admin/"
      unpackWARs="true" autoDeploy="true">
  <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  <Valve className="org.apache.catalina.valves.AccessLogValve"
         directory="logs"
         prefix="tomcat_access_log." suffix=".log"
         pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>
<Host name="development.domain.tld" appBase="webapps/development/"
      unpackWARs="true" autoDeploy="true" deployOnStartup="false">
  <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  <Valve className="org.apache.catalina.valves.AccessLogValve"
         directory="logs/development"
         prefix="devel_access_log." suffix=".log"
         pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>

The appBase of the two virtual hosts overlap. Make sure they're completely separate directories.

Here's the reference for appBase:

http://tomcat.apache.org/tomcat-7.0-doc/config/host.html

And read the automatic deployment section to figure out what happens when you've overlapped them.

http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic_Application_Deployment

One way to set up virtual hosts so that this doesn't happen:

http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts

. . . . just my two cents.
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to