Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-2008, 08:12 PM
Junior Member
 
Posts: 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 08:15 PM..
Reply With Quote
  #2 (permalink)  
Old 12-30-2008, 06:13 PM
Junior Member
 
Posts: 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
Reply With Quote
  #3 (permalink)  
Old 12-30-2008, 08:10 PM
Active Member
 
Posts: 49
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 09:05 AM..
Reply With Quote
  #4 (permalink)  
Old 12-31-2008, 04:55 PM
Junior Member
 
Posts: 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
Reply With Quote
  #5 (permalink)  
Old 12-31-2008, 07:21 PM
Active Member
 
Posts: 49
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 10:59 PM..
Reply With Quote
  #6 (permalink)  
Old 01-01-2009, 07:31 PM
Junior Member
 
Posts: 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....
Reply With Quote
  #7 (permalink)  
Old 01-01-2009, 08:45 PM
Active Member
 
Posts: 49
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...
Reply With Quote
  #8 (permalink)  
Old 01-01-2009, 10:20 PM
Junior Member
 
Posts: 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
Reply With Quote
  #9 (permalink)  
Old 01-02-2009, 07:54 AM
Active Member
 
Posts: 49
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.