Results 1 to 9 of 9

Thread: Ubuntu 8.04 and Apache problems.....

  1. #1
    Arron is offline Junior Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    6

    Default Ubuntu 8.04 and Apache problems.....

    Im new to Zimbra, and Im trying to set it up to replace a current squirrelmail webmail site.

    As well im one of the many I have read who are having problem with an Apache server running with Zimbra.

    I did the install, and the admin and normal login work well. But to have apache run as well for some webserving, i cant get it to go.

    I have tried both main ways, first i tried from

    http://wiki.zimbra.com/index.php?tit..._mod_proxy_ajp

    to use the proxy agp. I followed the howto, seemed to flow ok and completed it. However when I was finished the setup, I couldn't connect. Threw some digging, I found that the mailboxd would start for a few seconds and then stop. I couldn't find any errors why. After some digging,I found some posts about it, but it was for Zimbra RC1 and a bug was filled.

    So, I reinstall with he script and try another way to accomplish having apache play nice

    http://wiki.zimbra.com/index.php?tit...on_with_Apache

    The howto had some small errors that i got around

    ** Step 4
    SSLCertificateFile /opt/zimbra/ssl/ssl/server/server.crt
    SSLCertificateKeyFile /opt/zimbra/ssl/ssl/server/server.key
    should be
    SSLCertificateFile /opt/zimbra/ssl/zimbra/server/server.crt
    SSLCertificateKeyFile /opt/zimbra/ssl/zimbra/server/server.key
    to at least match the ubuntu install for dir's

    and
    sudo httpd -t
    to
    sudo /opt/zimbra/httpd-2.2.8/bin/httpd
    because of paths not setup

    and
    sudo /etc/init.d/httpd restart
    to
    sudo /etc/init.d/apache2 restart
    in ubuntu its apache2not httpd, but these are no big deals really, compared to the work people have put into this project.

    anyhow all small and trivial. when i restart apache2 i get
    Code:
    $ sudo /etc/init.d/apache2 restart
     * Restarting web server apache2                                                                                                                      apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Mon Dec 29 22:58:35 2008] [error] VirtualHost *:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Mon Dec 29 22:58:35 2008] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    httpd (no pid file) not running
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Mon Dec 29 22:58:45 2008] [error] VirtualHost *:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Mon Dec 29 22:58:45 2008] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    No i know the server names I have messed up on the initial install, while getting the dns setup. ( a howto to change the server name would be nice, even running the install.sh wont do it after its already installed,can I just edit /opt/zimbra/.saveconfig/config.save and restart the server?) but something is still not jiving.

    Has apache integration been implemented yet like I have seen some posts about? This would make life a lot easier.

    For now, I need some time to rest the old eyes after hours trying to learn zimbra which seem very impressive.

    Thanks

    Arron
    Last edited by Arron; 12-29-2008 at 09:15 PM.

  2. #2
    Arron is offline Junior Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    6

    Default

    Hi

    Found and tried a new howto...

    http://wiki.zimbra.com/index.php?tit...es_with_Zimbra

    It seems to be a bit outdated with tomcat, and does not get Zimbra to use the other port. I believe its:

    /opt/zimbra/bin/zmapachectl

    to now control the www server.

    I would be more than willing to write up a new howto, but could I please get some help to get apache to run with zimbra?

    Thanks

  3. #3
    Mccreations is offline Active Member
    Join Date
    Mar 2008
    Location
    Chicago, IL
    Posts
    49
    Rep Power
    7

    Default

    Alright, after about 15 edits I think I have this down.
    I hope I can help, I'm no zimbra expert but I know my way around apache and ubuntu.

    This is the code that I use:

    Code:
    NameVirtualHost *:80
    NameVirtualHost *:443
    
    < VirtualHost *:80 >
            ServerAlias mail.yourdomain.tld
            ProxyPass       /       http://localhost:7443/
            ProxyPassReverse   /     http://localhost:7443/
    < /VirtualHost >
    
    < VirtualHost *:443 >
            ServerAlias mail.yourdomain.tld
            SSLEngine on      
            SSLProxyEngine on        
            SSLCertificateFile /opt/zimbra/ssl/zimbra/server/server.crt
            SSLCertificateKeyFile /opt/zimbra/ssl/zimbra/server/server.key             
            ProxyPass / http://localhost:7443/
            ProxyPassReverse / http://localhost:7443/        
    < /VirtualHost >
    Make sure to remove the spaces near the < and >'s because for some reason it wouldn't let met post them...

    You would change port 7443 to whatever port you have assigned zimbra's mailbox.
    Have you changed the ports yet?
    And it sounds at one point like you're trying to use zimbra's apache server, is that what you're trying to acomplish?
    I don't think it's recommended to use zimbra's apache server for anything other then what is already used for (spell..?)
    And also I don't think zimbra uses tomcat anymore, I'm pretty sure they use jetty.

    And for the apache errors would it be possible to port your httpd.conf?
    Last edited by Mccreations; 12-31-2008 at 10:05 AM.

  4. #4
    Arron is offline Junior Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    6

    Default

    Thanks for your reply.

    Yes, I do have Zimbra Apache installed,I thought it was a requirement of Zimbra, as well as spell. So should i reinstall with no apache, or spell? Is there more info on this? What packages should I install with Zimbra? And default ports?

    So I bring this virtualhost up on apache as per your post, do I need to do anything with Zimbra?

    I would like to write a new howto on here, so any and all info you can help me with would be great.

    Thanks

  5. #5
    Mccreations is offline Active Member
    Join Date
    Mar 2008
    Location
    Chicago, IL
    Posts
    49
    Rep Power
    7

    Default

    Quote Originally Posted by Arron View Post
    Thanks for your reply.

    Yes, I do have Zimbra Apache installed,I thought it was a requirement of Zimbra, as well as spell. So should i reinstall with no apache, or spell? Is there more info on this? What packages should I install with Zimbra? And default ports?

    So I bring this virtualhost up on apache as per your post, do I need to do anything with Zimbra?

    I would like to write a new howto on here, so any and all info you can help me with would be great.

    Thanks
    Sorry for the confusion. You should have zimbra installed with apache. To use this method with the virtual hosts, you need to have an additional installation of apache that has nothing to do with zimbra besides those virtual hosts. This will serve on port 80 and 443 while zimbra mailbox serves on a port of your choice. You should change zimbra's mailbox ports to something other then 80 and 443.

    I'd also love to help write a new wiki article as well. So if you'd like some help just send me a message or email.
    Last edited by Mccreations; 12-31-2008 at 11:59 PM.

  6. #6
    Arron is offline Junior Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    6

    Default

    Did some more digging.... I can get it up somewhat now but I don thtink its secure.

    I did a install with no zimbra apache, spell or smnp packages. I then put in that code you pasted under my domain file in /etc/apache2/sites-enabled/mysite. I had zimbra listen to ports 81 and 444, and they came up fine.

    Still no luck, had some permission errors. So I did some more digging, and found that if I edit /etc/apache2/mods-available/proxy.conf and allow from all ( this is the BIG security problem), bingo the proxy will work, and i can connect with mail.mydomain.com.

    However this is not secure. There must be some .conf file i can drop in apache for this. Why is this so confusing....

  7. #7
    Mccreations is offline Active Member
    Join Date
    Mar 2008
    Location
    Chicago, IL
    Posts
    49
    Rep Power
    7

    Default

    Quote Originally Posted by Arron View Post
    Did some more digging.... I can get it up somewhat now but I don thtink its secure.

    I did a install with no zimbra apache, spell or smnp packages. I then put in that code you pasted under my domain file in /etc/apache2/sites-enabled/mysite. I had zimbra listen to ports 81 and 444, and they came up fine.

    Still no luck, had some permission errors. So I did some more digging, and found that if I edit /etc/apache2/mods-available/proxy.conf and allow from all ( this is the BIG security problem), bingo the proxy will work, and i can connect with mail.mydomain.com.

    However this is not secure. There must be some .conf file i can drop in apache for this. Why is this so confusing....
    Sorry about the trouble, I'm not sure why you're having such bad luck.

    Here's a few things I would try:
    - Chmod 777 the certificate files, chances are your apache won't be running under zimbra. If you are having any problems with SSL that may solve them.
    - For the permission denied thing, you need to allow that specific proxy access. So you'd add this to your config:

    Code:
    < Proxy http://localhost:81/ >
    AddDefaultCharset off
    Order allow,deny
    Allow from all
    < /Proxy >
    So for you here's what your whole configuration would look like:

    Code:
    NameVirtualHost *:80
    NameVirtualHost *:443
    < Proxy http://localhost:81/ >
    AddDefaultCharset off
    Order allow,deny
    Allow from all
    < /Proxy >
    < VirtualHost *:443 > 
            SSLEngine on      
            SSLProxyEngine on        
            SSLCertificateFile /opt/zimbra/ssl/zimbra/server/server.crt
            SSLCertificateKeyFile /opt/zimbra/ssl/zimbra/server/server.key             
            ProxyPass / http://localhost:81/
            ProxyPassReverse / http://localhost:81/    
            ServerAlias mail.yourdomain.tld  
    < /VirtualHost >
    
    < VirtualHost *:80 >
            ProxyPass       /       http://localhost:81/
            ProxyPassReverse   /     http://localhost:81/
            ServerAlias mail.yourdomain.tld
    < /VirtualHost >
    (Remember once again to remove the spaces after/before the s)

    That SHOULD get you up and running, but you never know...

  8. #8
    Arron is offline Junior Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    6

    Default

    Ok I think i got it....

    I removed zimbra, did a new install. No zimbra apache, spell or smnp.

    Ports http-81 and https444.

    then I put this in /etc/apache2/conf.d/zimbra


    HTML Code:
    NameVirtualHost *:80
    NameVirtualHost *:443
    
    <Proxy http://localhost:81/>
    AddDefaultCharset off
    Order allow,deny
    Allow from all
    </Proxy>
    
    
    <VirtualHost 192.168.0.1:80>
            SSLEngine off
            SSLProxyEngine off
            ProxyPass       /       http://localhost:81/
            ProxyPassReverse   /     http://localhost:81/
            ServerAlias mail.arron.ca
    </VirtualHost>
    
    
    <VirtualHost 192.168.0.1:443>
            SSLEngine on
            SSLProxyEngine on
            SSLCertificateFile /opt/zimbra/ssl/zimbra/server/server.crt
            SSLCertificateKeyFile /opt/zimbra/ssl/zimbra/server/server.key
            ProxyPass / http://localhost:81/
            ProxyPassReverse / http://localhost:81/
            ServerAlias mail.arron.ca
    </VirtualHost>

    Then restarted apache. For some reason I had to put in my server IP, when I used a * i got:

    Code:
    $ sudo /etc/init.d/apache2 restart
     * Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Fri Jan 02 01:02:45 2009] [error] VirtualHost *:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:45 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:45 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Fri Jan 02 01:02:45 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Fri Jan 02 01:02:55 2009] [error] VirtualHost *:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:55 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:55 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Fri Jan 02 01:02:55 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                                             [ OK ]
    It is a clean install of apache, so maybe i have to configure it more im not sure. If I did not put in the ip, then it would take the first config, and server http and never https.

    So now it seems to be running fine, now I have to spend time learning the configurations of it. If I get more time id like to work out these bugs some more.

    The ssl permissions were not a problem

  9. #9
    Mccreations is offline Active Member
    Join Date
    Mar 2008
    Location
    Chicago, IL
    Posts
    49
    Rep Power
    7

    Default

    Quote Originally Posted by Arron View Post
    Ok I think i got it....

    I removed zimbra, did a new install. No zimbra apache, spell or smnp.

    Ports http-81 and https444.

    then I put this in /etc/apache2/conf.d/zimbra


    HTML Code:
    NameVirtualHost *:80
    NameVirtualHost *:443
    
    <Proxy http://localhost:81/>
    AddDefaultCharset off
    Order allow,deny
    Allow from all
    </Proxy>
    
    
    <VirtualHost 192.168.0.1:80>
            SSLEngine off
            SSLProxyEngine off
            ProxyPass       /       http://localhost:81/
            ProxyPassReverse   /     http://localhost:81/
            ServerAlias mail.arron.ca
    </VirtualHost>
    
    
    <VirtualHost 192.168.0.1:443>
            SSLEngine on
            SSLProxyEngine on
            SSLCertificateFile /opt/zimbra/ssl/zimbra/server/server.crt
            SSLCertificateKeyFile /opt/zimbra/ssl/zimbra/server/server.key
            ProxyPass / http://localhost:81/
            ProxyPassReverse / http://localhost:81/
            ServerAlias mail.arron.ca
    </VirtualHost>

    Then restarted apache. For some reason I had to put in my server IP, when I used a * i got:

    Code:
    $ sudo /etc/init.d/apache2 restart
     * Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Fri Jan 02 01:02:45 2009] [error] VirtualHost *:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:45 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:45 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Fri Jan 02 01:02:45 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Fri Jan 02 01:02:55 2009] [error] VirtualHost *:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:55 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Fri Jan 02 01:02:55 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Fri Jan 02 01:02:55 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                                             [ OK ]
    It is a clean install of apache, so maybe i have to configure it more im not sure. If I did not put in the ip, then it would take the first config, and server http and never https.

    So now it seems to be running fine, now I have to spend time learning the configurations of it. If I get more time id like to work out these bugs some more.

    The ssl permissions were not a problem
    The reason why you were getting those errors is because you probably already IP defined virtual hosts. So what you did was correct. You can remove the NameVirtualHost *:80 and *:443's now. Make sure that you either use all IPs or all *orts.

    And for the "Could not..." errors, you probably need to set a ServerName in each of your virtual hosts. So for instance in your mail virtual hosts:
    Code:
    ServerName mail.arron.ca
    You'd have to do that in each of your virtual hosts.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra and apache proxy on diferent servers
    By acon in forum Administrators
    Replies: 1
    Last Post: 11-10-2008, 02:57 PM
  2. Replies: 1
    Last Post: 09-12-2008, 07:24 AM
  3. Replies: 1
    Last Post: 01-02-2008, 09:31 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
  •