webmail.domain.ext for every domain

reg

New member
Joined
Jan 6, 2004
Messages
2
Location
The Netherlands
Hi everyone,

I don't have a lot knowledge of configuring webservers. I have found an artikel on the forum of how to set up webmail.domain.ext instead of www.domain.ext/webmail. I think we all like it that way. So what I did is I put the following code in /etc/httpd/conf/httpd.conf for every IP-address that I use:

Code:
<VirtualHost 11.22.33.44:80>
  DocumentRoot /var/www/html/webmail
  ServerName webmail
  ServerAlias webmail.*
  UseCanonicalName Off
  <Directory /var/www/html/webmail>
    <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 "/var/www/html/webmail:/tmp"
      php_admin_value include_path "/var/www/html/webmail/inc:."
    </IfModule>
  </Directory>
</VirtualHost>
And I've noticed that I have to restart Apache after editing this file.

My questions are:
- Is this the right way to do it?
- Isn't there an easy way to make it work for all IP-addresses instead of adding all code for each IP-address?

Richard
 
Hello,

That looks fine to me.. try using

<VirtualHost *:80>

... might save some typing.

John
 
Back
Top