Thank you for your time so far!
And sorry for a long mail this time :)

Because I had some other problems with missing libraries I have decided to get 
a new installation of Tomcat from apache.org - It solved many problems as 
compared to Centos yum installation. I have a script that will start it as a 
service under tomcat account.

It is not that easy for me to get rid of Context element as when I do that, my 
mod_jk stops working 
I can use it like mydomain.com/alfresco but not mydomain.com
When I add Context element that points directly to alfresco, it works fine 
(mydomain.com).

Mikolaj wrote: "move webapp to folder different than webapps and update docBase"
Well, that alone did not fix my problem, I believe What is needed additionally 
is 
deployOnStartup=false - does this option set to true deployes only to default 
location? (not the one specified in context?)

Chuck wrote: "docBase should point to some directory or .war file directly 
*underneath* the appBase directory."

I'm confused as documentation says:

"When using automatic deployment, the docBase defined by an XML Context file 
should be outside of the appBase directory. If this is not the case 
difficulties may be experienced deploying the web application or the 
application may be deployed twice.

Finally, note that if you are defining contexts explicitly, you should probably 
turn off automatic application deployment. Otherwise, your context will be 
deployed twice each, and that may cause problems for your app."

Taking all of that into account, I have created this HOST definition, and I 
copy unpacked WAR manually to docBase dir.

        <Host name="localhost" debug="0" 
appBase="/usr/local/apache-tomcat-5.5.28/AlfrescoApp" unpackWARs="true"        
autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false" 
deployOnStartup="false">
        <Context path="" 
docBase="/usr/local/apache-tomcat-5.5.28/AlfrescoDocBase/alfresco"/>
        <Alias>alfresco.domain.com</Alias>
        </Host>

        <Host name="share.tessel.pl" debug="0" 
appBase="/usr/local/apache-tomcat-5.5.28/ShareApp" unpackWARs="true"     
autoDeploy="false" xmlValidation="false" xmlNamespaceAware="false" 
deployOnStartup="false">
        <Context path="" 
docBase="/usr/local/apache-tomcat-5.5.28/ShareDocBase/share"/>
        <Alias>share.domain.com</Alias>
        </Host>


My virtual host for Apache looks like this:

<VirtualHost *:80>
        ServerName alfresco.domain.com
        DocumentRoot /usr/local/apache-tomcat-5.5.28/AlfrescoDocBase/alfresco
        #DirectoryIndex index.jsp

        Alias /alfresco 
"/usr/local/apache-tomcat-5.5.28/AlfrescoDocBase/alfresco"

        JkMount /* alfresco_wrk

        JkUnMount /images/* alfresco_wrk
        JkUnMount /css/* alfresco_wrk
        JkUnMount /scripts/* alfresco_wrk
        JkUnMount /yui/* alfresco_wrk
        JkUnMount /*.gif alfresco_wrk
        JkUnMount /*.jpg alfresco_wrk
        JkUnMount /*.html alfresco_wrk

        Options FollowSymLinks
        
        <Directory /usr/local/apache-tomcat-5.5.28/AlfrescoDocBase/alfresco>
                AllowOverride None
                Allow from all
        </Directory>

        <Directory 
/usr/local/apache-tomcat-5.5.28/AlfrescoDocBase/alfresco/WEB-INF/>
                AllowOverride None
                deny from all
        </Directory>
        <Directory 
/usr/local/apache-tomcat-5.5.28/AlfrescoDocBase/alfresco/META-INF/>
                AllowOverride None
                deny from all
        </Directory>
</VirtualHost>


Final questions:
Is this configuration reasonable, or is it a total mess? :)
Can I be sure that applications will not get started twice now?

Can you please suggest best solution so that application Alfresco that is now 
available under
http://localhost:8080/
would be at the same time available under
http://localhost:8080/alfresco
? This is needed for multiple endpoints that Share site refers to.

Thank you!
Maciej

-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Thursday, October 08, 2009 1:57 PM
To: Tomcat Users List
Subject: Re: Application gets started twice

Maciej Zabielski wrote:
> Hi, 
> I couldn't find anything related to my configuration problem.
> I have Alfresco application installed under webapps/alfresco. The host looks 
> like this:
> 
> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" 
> autoDeploy="false"  xmlValidation="false" xmlNamespaceAware="false">
>        <Context path="" docBase="/var/lib/tomcat5/webapps/alfresco"/>         
>        <Alias>alfresco.mydomain.com</Alias>
> </Host>

deployOnStartup is deploying the affresco dir as "/alfresco" when Tomcat starts.
Set deployOnStartup to false or delete the above context element and rename
"/var/lib/tomcat5/webapps/alfresco" to "/var/lib/tomcat5/webapps/ROOT"

Mark


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


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

Reply via email to