Page 1 of 2 12 LastLast
Results 1 to 10 of 22

Thread: Tomcat personnal php webapp

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default [SOLVED using Apache mod_proxy] Tomcat personnal php webapp

    Hello,

    I want to install a personnal webapp wrote in php4 in the tomcat installed by zimbra.
    I have succesfully compiled php4 with java and servlet and moved the two resulting files in /opt/zimbra/tomcat/common/libs,
    I ve also added support for php in /opt/zimbra/tomcat/conf/web.xml.
    My problem is that i need a place to put my php file but I dont really know tomcat and I m getting an error that I have searched
    on google and it says that my file are badly place (java did not find the php file when it tries to open it).

    I have searched on the zimbra forum and I am currently searching again on zimbra and google but if you have a fast and easy answer/solution I really appreciate it.
    (Or if you can point me to the right topic.)

    When I find a good solution, I will post it here.
    Last edited by dzed; 04-11-2006 at 03:29 AM.

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    You shouldn't really use the Zimbra Tomcat for anything other than Zimbra. It will certainly get overwritten on an upgrade and may also affect Zimbra performance and or functions if you're not careful. Is there no other option that you could use?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default

    I did not have any other solution that s the problem ..

    I have just one server with only one interface and I cannot bind the interface to have multiple address (it s a production server connected directly to the internet and accessible only form the internet).
    I could put another apache webserver but the final user will not appreciate/understand the need of putting the port in the url.

    So, the only solution is to add my webapp to the installed tomcat.
    The upgrade procedure could be a real pain but it s nothing compared to all the complaints that I will receive from my end-user if I dont integrate my webapp in the zimbra tomcat.

    [sorry for my probably bad english]

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    I'm no expert on Apache but would this solution do what you want?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default

    In this topic, he has 2 servers on his lan.

    I have only one server so if i try his config, the apache server or zimbra server will say "could not bind to port 80" because it will be already in use.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by dzed
    In this topic, he has 2 servers on his lan.

    I have only one server so if i try his config, the apache server or zimbra server will say "could not bind to port 80" because it will be already in use.
    Yes, but you could change the port that Zimbra listens on, couldn't you?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  7. #7
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default [Solved]

    Everything is working

    Thanks a lot Phoenix, to point me in the right/easyest direction.
    Thanks also goes to Amitbapat.

    If anyone need it, I past the way to do what i have done here :

    I am using a Debian Sarge.


    First of all, change zimbraMailPort and restart zimbra so our apache can listen on 80, do it like this :

    zmprov ms zimbra.mydom.com zimbraMailPort 81
    /etc/init.d/zimbra restart


    Then, install your prefered apache version (1.3 / 2) and add the proxy module :

    for apache 1.3 :
    echo "LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so" >> /etc/apache/modules.conf
    apachectl restart


    for apache 2 :
    ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load
    ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf
    /etc/init.d/apache2 restart


    Now we can add our virtualhosts.

    for apache 1.3, go into /etc/apache/conf.d/ and create/edit vhosts.conf :
    [for apache 2 go into /etc/apache2/conf.d/]
    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerAdmin dz@mydom.com
    DocumentRoot /var/www/myweb
    ServerName myweb.mydom.com
    ErrorLog /var/log/apache/myweb-error.log
    CustomLog /var/log/apache/myweb-access.log common
    </VirtualHost>

    <VirtualHost *:80>
    ServerName zimbra.mydom.com
    ServerAdmin dz@mydom.com
    ProxyPass / http://zimbra.mydom.com:81/
    ProxyPassReverse / http://zimbra.mydom.com:81/
    ErrorLog /var/log/apache/zimbra-error.log
    CustomLog /var/log/apache/zimbra-access.log common
    </VirtualHost>


    Almost done.
    Restart everythings.
    Test your new hosts.
    Enjoy ZIMBRA

  8. #8
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Glad you've got it working, don't forget that you could enter this in the wiki.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  9. #9
    Join Date
    Mar 2006
    Posts
    19
    Rep Power
    9

    Default

    I have added it to the wiki in the 'Advanced Hacking' section (page named 'Running Zimbra and another Apache on the same host')

    Hope it will help someone

  10. #10
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Cool

    Thanks for doing that.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. Running tomcat after installation(solved)
    By mildred in forum Installation
    Replies: 0
    Last Post: 04-23-2007, 09:26 AM
  2. tomcat not running / postfix/postqueue errors
    By seravitae in forum Installation
    Replies: 7
    Last Post: 03-10-2007, 08:18 PM
  3. tomcat - macosx install - please help
    By gmsmith in forum Installation
    Replies: 3
    Last Post: 04-19-2006, 01:30 PM
  4. Replies: 2
    Last Post: 03-10-2006, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •