Virtual Host, squirrelmail and apache

Support for webhosts that use CentOS
Post Reply
Jujo
Posts: 1
Joined: 2005/08/30 18:05:49
Contact:

Virtual Host, squirrelmail and apache

Post by Jujo » 2005/11/09 23:07:35

Hello,

I've been configuring the virtualhosts, and I've come out to a "stop point". I mean, I feel like the http request is being stop at the DNS server without being forwarded to the appropiate service.

In this case I'm working only with one machine 192.168.1.1 and this machine is hosting DNS, mailserver and web server.

The classic example of virtual host would be assigning http://webmail.dominio.com to /usr/share/squirrelmail being dominio.com my domain.

Let's see the results of the http petitions
[quote]

http://www.dominio.com OK

http://dominio.com OK

http://webmail.dominio.com DNS error

http://www.dominio.com/webmail OK

http://mail.dominio.com Shows the page but squirrelmail is not working at all
[/quote]


mail.dominio.com and smtp.dominio.com are listed in the bind as MX. Looging into squirrelmail by http://mail.dominio.com let's you introduce user and password, but when it is supposed to show your messages gives the following error:





ERROR : Could not complete request.

Query: SELECT "INBOX"

Reason Given: Internal error occured. Refer to server log for more information. [2005-11-09 16:48:40]



In the log I only see :

[quote]

[Wed Nov 09 16:47:54 2005] [error] [here.the.proxy.ip] File does not exist: /usr/share/squirrelmail/favicon.ico
[/quote]


The error to not see the messages should be something more beside the favicon.....
I give more data:

The relevant part of /etc/httpd/conf.d/vhosts.conf is:

[quote]
# Definición del Sitio de Red principal
NameVirtualHost 192.168.1.1

------------>> I have intentionaly left a space so it is shown in the phorum
ServerAdmin webmaster@dominio.com
DocumentRoot /var/www/html/
ServerName www.dominio.com
------------>> I have intentionaly left a space so it is shown in the phorum


ServerAdmin webmaster@dominio.com
DocumentRoot /usr/share/squirrelmail/
ServerName webmail.dominio.com
ErrorLog logs/webmail.dominio.com-error_log
CustomLog logs/webmail.dominio.com-access_log combined




ServerAdmin webmaster@dominio.com
DocumentRoot /usr/share/squirrelmail/
ServerName mail.dominio.com
ErrorLog logs/mail.dominio.com-error_log
CustomLog logs/mail.dominio.com-access_log combined


[/quote]


The apache configuration file is a fresh new one that was comming with

Any idea?

As far as I can see http://mail.domain.com is working because mail.domain.com is listed as MX in the bind zone file, but as far as I can imagine, I shouldn't list in bind every virtualhost I'm configuring in apache.

May I provide any other information to have this solved?

Regards
Jujo

arrfab
Site Admin
Posts: 870
Joined: 2005/01/03 21:30:54
Location: /country/belgium
Contact:

Virtual Host, squirrelmail and apache

Post by arrfab » 2005/11/15 20:35:40

It seems more related to a DNS problem ...
What's the content of your DNS zone ? Have you created a A record or a CNAME record for all your hosts ?
From a client point of view, what's the result of the command : host webmail.dominio.com ?

rscotka
Posts: 1
Joined: 2005/11/18 01:51:38
Location: Ohio

Re: Virtual Host, squirrelmail and apache

Post by rscotka » 2005/11/18 03:12:21

A ping of www.dominio.com or dominio.com results in successful pings to: ev1s-67-15-130-29.ev1servers.net

dig dominio.com MX shows:

dominio.com. 42740 IN MX 5 smtp.easydns.com.

A ping of mail.dominio.com results in "unknown host mail.dominio.com".

If all you have is one machine, make sure that all records point to that machine (MX, A, www, mail, webmail). From digs and whois commands, you probably have an interface at easyDNS.com where you can easily change this information.

[code]
example

mail IN A (dominio.com IP)
webmail IN A (dominio.com IP)

[/code]

Claiming 'mail' as an A record simply records it as a viable subdomain to dominio.com and does not mean that your email is handled by mail.domninio.com. You'll want your MX record to point to the dominio.com IP if you are serving websites and mail off of the same machine.

I'm failing to see how VirtualHosts has anything to do with this problem. It's possible to make webmail.dominio.com as a vhost on the WWW machine but not necessary at all; in fact it would greatly complicate the situation IMO.

Hope this adds some new perspective.

Post Reply

Return to “CentOS 4 - Webhosting Support”