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

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 10-24-2005, 07:44 AM
Senior Member
 
Posts: 54
Default Install - Mostly OK, few probs

I installed zimbra without a hitch, pretty much.
however, due to the current network admins setup here, the DNS is still not working for the site inside our local network. At my house, i tried going to http://curley.quirkservice.com and got a "forbidden" error message.

does anyone know the quick fix for this?

Here is what i want the final set up to be like:
- http://mail.quirkservice.com goes to zimbra
- http://www.quirkservice.com, http://quirkservice.com goes to another webserver
- if i send mail to drogers@quirkservice.com, i want it to go to zimbra
- I would like ebay.qurkservice.com to point to another directory on the zimbra machine

Here is what i have so far:
- curley.quirkservice.com is what i installed zimbra with
- the dns is configured to send the correct traffic to the correct box (i think)
- i have the mx record for quirkservice.com pointing to the zimbra machine

is that all it takes for mail going to quirkservice.com to be sent to the zimbra machine?

do i need to add quirkservice.com as a server in the zimbra admin settings?


is it possible to set up a virtual domain to have the ebay.quirkservice.com subdomain exist on the same server?
Reply With Quote
  #2 (permalink)  
Old 10-24-2005, 08:32 AM
Special Member & Volunteer
 
Posts: 155
Default

Quote:
Originally Posted by drogers
I installed zimbra without a hitch, pretty much.
however, due to the current network admins setup here, the DNS is still not working for the site inside our local network. At my house, i tried going to http://curley.quirkservice.com and got a "forbidden" error message.
Hrm. If you log into the actual box Zimbra is running on, and use the links browser, does it work (as much as links can), or do you get the same forbidden message?

Quote:
Originally Posted by drogers
Here is what i have so far:
- curley.quirkservice.com is what i installed zimbra with
- the dns is configured to send the correct traffic to the correct box (i think)
- i have the mx record for quirkservice.com pointing to the zimbra machine

is that all it takes for mail going to quirkservice.com to be sent to the zimbra machine?
Yup. All this can just be done in DNS. As you said, the MX record for your domain should point to the Zimbra server... which should be the same IP as mail.quickservice.com.

Quote:
Originally Posted by drogers
do i need to add quirkservice.com as a server in the zimbra admin settings?
Believe it or not, this is a trick question.

Yes, ultimatly... to be capable of receiving mail for quickservice.com, you have to add that domain into Zimbra.

Or, put another way... for every domain you wish to receive mail for, you need to add that domain into Zimbra, using the admin interface.

Now, during your install, it asked you what domain would be the default. It defaults to hostname.domainname.com.

There's an unfortunate bug in the current version that prevents you from adding domainname.com to the list of hosts you receive email for, when there's any subdomain of that domain already in there. So, if "hostname.domainname.com" exists in Zimbra, you can't add "domainname.com". You *can* add other subdomains, such as "mail.domainname.com".

The Zimbra folks are hot on the case though, and said they have that problem fixed for the next release.

Quote:
Originally Posted by drogers
is it possible to set up a virtual domain to have the ebay.quirkservice.com subdomain exist on the same server?
Are you referring to a virtual domain that's not running Zimbra? You can do this, but not through Zimbra. You'd need to add something like Apache into the mix.

What I did is run Apache on port 80, to server a basic website. On that site, I included an "Email Login" link that hands the browser off to Zimbra, which runs on another port.

You could do something similar to host other domains on that same server. To run Apache on port 80, you have to tell Zimbra to stop handling port 80 requests. You can do that by editing "/opt/zimbra/bin/zmiptables", and you'll see the following around line 34:

80 => 7070, # HTTP

Just comment that line out (putting a # at the front of the line), and restart Zimbra (/etc/init.d/zimbra restart).

Now you can start up Apache on port 80. Anytime you want a user to reach Zimbra, you'd just redirect them to port 7070. I personally did that with the following virtual host lines in my /etc/httpd/conf/httpd.conf:

Code:
<VirtualHost *:80>

  # Servername is the domain name you want users to type into their
  # browser in order to connect to Zimbra
  ServerName mail.mydomain.com

  # Pass every request off to Zimbra
  RewriteEngine           On
  RewriteRule ^(.*)$ http://127.0.0.1:7070$1 [P]
  RewriteRule ^proxy:.* - [F]

  # On the way back, rewrite headers containing this domain name and port,
  # effectively hiding the port from the user
  ProxyPassReverse / http://mail.mydomain.com:7070/

  ProxyPreserveHost On
</VirtualHost>
That makes it so that anytime someone connects to "mail.mydomain.com", it hands the request off to Zimbra on port 7070. Otherwise, it's assumed that there's another virtualhost defined that would handle the request (the first virtual host defined is the default, I believe).

The neat thing about the above setup is that the browser never sees the fact that there's another server running on port 7070, Apache using mod_rewrite and mod_proxy to hide it. This does assume those two modules are available, but that's the default in RedHat.

Have a good one,
-Eric
Reply With Quote
  #3 (permalink)  
Old 10-27-2005, 08:03 AM
Senior Member
 
Posts: 54
Question two webservers?

Ok. i am pretty new to linux enviroments, so bear with me.

i commented out the line in the zmiptables file, but it still seems to be forwarding port 80 requests to 7070. e.g. if i go to curley.quirkservice.com, it still brings up the mail page.

apache/httpd is apparently installed on my system, but it isn't running. also, under add/remove application in gnome, when i go to add mod_rewrite and mod_proxy don't seem to be listed under the install options. are they just included automatically?

stupid question:
is /etc/init.d/httpd restart
the same as /etc/init.d/apache2 restart? on a different system?

Last edited by drogers; 10-27-2005 at 08:31 AM..
Reply With Quote
  #4 (permalink)  
Old 10-27-2005, 09:24 AM
Special Member & Volunteer
 
Posts: 155
Default

Quote:
Originally Posted by drogers
i commented out the line in the zmiptables file, but it still seems to be forwarding port 80 requests to 7070. e.g. if i go to curley.quirkservice.com, it still brings up the mail page.
After you do that, you have to restart Zimbra.

Or, even quicker, you could just type (as root):

su - zimbra
zmiptables -u
zmiptables -i

That uninstalls all the ports zimbra is using, then reinstalls them, but should skip over the port 80 that you were interested in having available for Apache.

Quote:
Originally Posted by drogers
apache/httpd is apparently installed on my system, but it isn't running. also, under add/remove application in gnome, when i go to add mod_rewrite and mod_proxy don't seem to be listed under the install options. are they just included automatically?
Yeah, Apache won't run if something else is using your port 80. As soon as you re-run the zmiptables as described above, apache should start for you. You can just type:

service httpd start

To load up Apache.

You probably don't need to install mod_rewrite and mod_proxy. From the looks of things, they're included with RedHat's version of Apache.

Quote:
Originally Posted by drogers
stupid question:
is /etc/init.d/httpd restart
the same as /etc/init.d/apache2 restart? on a different system?
Yeah, they say Linux and UNIX are like car stereos... they all work the same, but you'll often find the buttons in different places.

On RedHat (meaning RedHat Enterprise or Fedora), their name for the Apache2 startup script is "httpd". On other distros, Gentoo for example, their name for the Apache2 startup script is "apache2". They all have their reasons :-)

The two examples you gave do the same thing on their respective systems. On a RedHat based distro, you'd need to use "/etc/init.d/httpd restart". In RedHat, "service httpd restart" is a shortcut for the above.

Have a good one,
-Eric
Reply With Quote
  #5 (permalink)  
Old 10-27-2005, 10:19 AM
Senior Member
 
Posts: 54
Default

Quote:
After you do that, you have to restart Zimbra.

Or, even quicker, you could just type (as root):

su - zimbra
zmiptables -u
zmiptables -i
I did restart zimbra, and it the login screen still loads up when i go to http://curley.quirkservice.com

i ran the zmiptables commands, and now it says that /zimbra/mail cannot be found...

I then added what you gave me to the httpd.conf file. and now curley.quirkservice.com goes right back to the zimbra log in again.

i looked at /opt/zimbra/bin/zmiptables, and it still looks the same as it was since i commented out the 80 => 7070 line.

should useCanonicalNames be turned on or off?
i uncommented out ServerName and set that value to curley.quirkservice.com

Code:
ServerName curley.quirkservice.com:80

<VirtualHost *:80>

  # Servername is the domain name you want users to type into their
  # browser in order to connect to Zimbra
  ServerName mail.quirkservice.com

  # Pass every request off to Zimbra
  RewriteEngine           On
  RewriteRule ^(.*)$ http://127.0.0.1:7070$1 [P]
  RewriteRule ^proxy:.* - [F]

  # On the way back, rewrite headers containing this domain name and port,
  # effectively hiding the port from the user
  ProxyPassReverse / http://mail.quirkservice.com:7070/

  ProxyPreserveHost On
</VirtualHost>
here is my hosts file, if that helps:

Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain	localhost
141.154.98.107 curley.quirkservice.com curley
141.154.98.107 mail.quirkservice.com mail
is that how it is supposed to be set up? do i need to have both entries?


my goal is to have people go to http://mail.quirkservice.com and get to the mail client, which i think is possible once the dns finishes propagating ( i only added mail.quirkservice.com to the dns a few hours ago) given the info you gave me to put in my httpd.conf file.

however, if someone goes to curley.quirkservice.com, or even just type in the IP address, bring up another website hosted on that machine.
Reply With Quote
  #6 (permalink)  
Old 10-27-2005, 10:35 AM
Special Member & Volunteer
 
Posts: 155
Default

Quote:
Originally Posted by drogers
i ran the zmiptables commands, and now it says that /zimbra/mail cannot be found...
Good, you're on the right track.

Quote:
Originally Posted by drogers
I then added what you gave me to the httpd.conf file. and now curley.quirkservice.com goes right back to the zimbra log in again.

i looked at /opt/zimbra/bin/zmiptables, and it still looks the same as it was since i commented out the 80 => 7070 line.
Yeah, the httpd.conf snippet I mentioned is only part of what you'll need for it to work. This is what I would expect with just that snippet... you still have to tell it what you want to do with non-Zimbra web requests (ie, for curley.quickservice.com).

The entire thing you want to add would probably look something like the following:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
ServerName curley.quirkservice.com
DocumentRoot /var/www/html
 <Directory /var/www/html>
    Options -Indexes FollowSymLinks MultiViews +ExecCGI
       AllowOverride All
     <IfModule mod_access.c>
       Order allow,deny
       Allow from all
     </IfModule>
 </Directory>

</VirtualHost>

<VirtualHost *:80>

  # Servername is the domain name you want users to type into their
  # browser in order to connect to Zimbra
  ServerName mail.quirkservice.com

  # Pass every request off to Zimbra
  RewriteEngine           On
  RewriteRule ^(.*)$ http://127.0.0.1:7070$1 [P]
  RewriteRule ^proxy:.* - [F]

  # On the way back, rewrite headers containing this domain name and port,
  # effectively hiding the port from the user
  ProxyPassReverse / http://mail.quirkservice.com:7070/

  ProxyPreserveHost On
</VirtualHost>
Quote:
Originally Posted by drogers
my goal is to have people go to http://mail.quirkservice.com and get to the mail client, which i think is possible once the dns finishes propagating ( i only added mail.quirkservice.com to the dns a few hours ago) given the info you gave me to put in my httpd.conf file.
Sure, that makes sense.

Adding the above to your httpd.conf file should do that for you. It assumes that you'll be putting a webpage for curley.quirkservice.com in the directory /var/www/html/.

Have a good one,
-Eric
Reply With Quote
  #7 (permalink)  
Old 10-27-2005, 12:48 PM
Senior Member
 
Posts: 54
Default

wow. thanks man. you've out done yourself. i didn't think i had to add a virtual host for curley.quirkservice.com, since it was the default.

however...

when i restart httpd, i get this warning:
[warn] _default_ VirtualHost overlap on port 80, the first has precedence

i messed around with the httpd.conf file, and kept getting variation of this error. i am gonna keep messing with it... here is the latest httpd.conf and error message

httpd.conf:
Code:
ServerName curley.quirkservice.com

<VirtualHost curley.quirkservice.com>
ServerName curley.quirkservice.com
DocumentRoot /var/www/html
 <Directory /var/www/html>
    Options -Indexes FollowSymLinks MultiViews +ExecCGI
       AllowOverride All
     <IfModule mod_access.c>
       Order allow,deny
       Allow from all
     </IfModule>
 </Directory>

</VirtualHost>

<VirtualHost 141.154.98.107:80>

  # Servername is the domain name you want users to type into their
  # browser in order to connect to Zimbra
  ServerName mail.quirkservice.com

  # Pass every request off to Zimbra
  RewriteEngine           On
  RewriteRule ^(.*)$ http://127.0.0.1:7070$1 [P]
  RewriteRule ^proxy:.* - [F]

  # On the way back, rewrite headers containing this domain name and port,

  # effectively hiding the port from the user
  ProxyPassReverse / http://mail.quirkservice.com:7070/

  ProxyPreserveHost On
</VirtualHost>
Code:
[warn] VirtualHost curley.quirkservice.com:0 overlaps with VirtualHost 141.154.98.107:80, the first has precedence, perhaps you need a NameVirtualHost directive
i guess if anyone can see what im doin wrong, just lemme know. im go back to googlin' this stuff.
thanks.
Reply With Quote
  #8 (permalink)  
Old 10-27-2005, 01:16 PM
Special Member & Volunteer
 
Posts: 155
Default

Quote:
Originally Posted by drogers
[warn] VirtualHost curley.quirkservice.com:0 overlaps with VirtualHost 141.154.98.107:80, the first has precedence, perhaps you need a NameVirtualHost directive

i guess if anyone can see what im doin wrong, just lemme know. im go back to googlin' this stuff.
thanks.
Hmm.

There was a line that looked like this in my post above, way at the top of the vhost snippit:

NameVirtualHost *:80

That line should make a world of difference in your httpd.conf file :-)

If it's not in there, adding it will probably fix up your issue.

Have a good one,
-Eric
Reply With Quote
  #9 (permalink)  
Old 10-27-2005, 01:38 PM
Senior Member
 
Posts: 54
Default

I had that origionally, but i was still getting the warning, so i deleted it. i added it back in and got:

[Thu Oct 27 16:23:30 2005] [warn] VirtualHost curley.quirkservice.com:0 overlaps with VirtualHost 141.154.98.107:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Thu Oct 27 16:23:30 2005] [warn] NameVirtualHost *:80 has no VirtualHosts


here is what happens based on the URL i use:

http://curley.quirkservice.com - fedora test page, good.

http://mail.quirkservice.com - can't find dns, that's ok tho, because there hasn't been enough time since i added it yet

http://141.154.98.107 - fedora test page, good

http://curley.quirkservice.com:7070 - starts to forward to zimbra (loads the grey background for an instant) then throws a 404 on /zimbra/mail

http://141.154.98.107:7070 - brings up zimbra, good.
Reply With Quote
  #10 (permalink)  
Old 10-27-2005, 01:44 PM
Special Member & Volunteer
 
Posts: 155
Default

Quote:
Originally Posted by drogers
I had that origionally, but i was still getting the warning, so i deleted it. i added it back in and got:
Ahh nuts.

Are you able to post your entire httpd.conf file? That might help. There's a way to add it as an attachment, rather than putting it in the body of your forum post (when you hit reply, scroll all the way down to "Additional Options").

I think you're really close, there's probably just something small getting in the way.
-Eric
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.