PDA

View Full Version : howto: webmail.domain.com



bvvelzen
11-17-2003, 07:16 AM
What is the best way to make it standard
in DA for every domain to get when you typ
webmail.domain.com to go to the squirrelmail?

I can't see a easy way to enter it into the dns admin?

ProWebUK
11-17-2003, 08:01 AM
The exact same problem has i believe only been fixed once in ensim, and that is using the custom apache.py file........ and im not really up2date on what thats for.... here is the fix for ensim... if anyone knows how this would be converted then... :D

http://forums.ev1servers.net/showthread.php?threadid=14328&highlight=webmail.domain.com

http://forums.ev1servers.net/showthread.php?threadid=6380&highlight=webmail.domain.com

Chris

DirectAdmin Support
11-17-2003, 12:50 PM
Hello,

I *think* (untested).. you could create one virtualhost in your main /etc/httpd/conf/httpd.conf (after the ips.conf and before the includes) that looks something like:

<VirtualHost *>
ServerName webmail.*
DocumentRoot /var/www/html/webmail
<Directory /var/www/html/webmail>
php_flag engine on
php_admin_value safe_mode 0
</Directory>
</VirtualHost>In theory, that should work.. You'd just need to make sure the webmail A record is added to the dns entry upon domain creation.

John

bvvelzen
11-17-2003, 01:00 PM
I tried it, but it has no result,

No, it give's result: Apache is functioning normally
but that's not the result we wanted.



In theory, that should work.. You'd just need to make sure the webmail A record is added to the dns entry upon domain creation.

Is this possible, I hoped it could? Isn't there a template for?

nobaloney
11-19-2003, 10:15 AM
WARNING:
This code is from a Plesk server using horde for webmail.

It WILL NOT WORK unchanged on a DA server.

I post it here only in case some guru wants to try to understand it and modify it to work with DA and either squirellmail or UebiMiau.


<VirtualHost 65.65.65.65:80>
DocumentRoot /home/httpd/vhosts/webmail
ServerName webmail
ServerAlias webmail.*
UseCanonicalName Off
<Directory /home/httpd/vhosts/webmail/horde>
<IfModule mod_php4.c>
php_admin_flag engine on
php_admin_flag magic_quotes_gpc off
php_admin_value safe_mode off
php_admin_value open_basedir "/home/httpd/vhosts/webmail:/etc/psa:/tmp"
php_admin_value include_path "/home/httpd/vhosts/webmail/horde/lib:/home/httpd/vhosts/webmail/horde/pear:."
</IfModule>
</Directory>
</VirtualHost>


Jeff

bvvelzen
11-20-2003, 05:44 AM
Tnx,

It worked for me, Just edit the path's and go ;-),

Greetings,

nobaloney
11-20-2003, 11:35 AM
Well I'm glad my Plesk Gold Partner relationship helped at least one person :) .

Jeff

torp
07-22-2004, 01:52 AM
After putting this into my httpd.conf, setting up a subdomain webmail under a domain, gives me the login screen for squirrelmail when pointing my browser to webmail.domain.com.

However, the login doesn't work, because webmail.domain.com is still in my browser, so the links get messed up.

If anyone else has this problem, I think you'll be better off solving the problem by putting a /webmail/ directory into your /default/ directory, and include an index.php file with a php header that automatically forwards to the correct path (domain.com/squirrelmail).

...unless of course someone has managed to work around this with httpd.conf...

skruf
07-22-2004, 07:04 AM
Hey,

Here something that seems to work that only requires a couple of minor mods to the default Virtualhost in the httpd.conf file.

In the main httpd.conf file where the default Virtualhost is defined, looks similar to this:

<VirtualHost your_server_IP_here:80>
ServerAdmin xxxx@xxxx.com
DocumentRoot /var/www/html
ServerName localhost
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
</VirtualHost>

Change it to this:

<VirtualHost 216.146.28.236:80>
ServerAdmin xxxx@xxxx.com
DocumentRoot /var/www/html/squirrelmail
ServerName localhost
ServerAlias webmail.*
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
</VirtualHost>

Basically, you are changing the DocumentRoot to point to squirrelmail and then adding a ServerAlias.

I don't know if it breaks anything with DA but, it seems to work OK.

Also, don't forget to make a DNS entry for each domain you want to point to webmail.domain.com.

You should be able to change the /squirrelmail to /webmail and to use UebiMiau.

As always, backup your httpd.conf before changing anything.

David

BTW, not sure how this acts on domains not on the main server IP. Didn't try that...