Linux-Noob Forums

Full Version: setting up mail.blahblah.com
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

For some reason when i type mail.undergroundinfection.net it sends me to my main page when i want it to take me to undergroundinfection.net/uinmail

how do i get it to do that and is it in the apache config or is it a dns thing?


well, if undergroundinfection.net points to /usr/local/www/mysite using virtual vhosts, then you can make the directory /usr/local/www/mysite/uinmail and add this to httpd.conf

 



Code:
<VirtualHost *:80>
ServerName mail.undergroundinfection.net
DocumentRoot /usr/local/www/mysite/uinmail
</VirtualHost>





When i tried that it didn't seem to alter the servers behavior at all and i got the following when i tried to restart the server:



Code:
[root@UndergroundInfection ~]service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: [Fri Oct 14 00:42:23 2005] [warn] _default_ VirtualHost overlap on port 80, the first has precedence                   [  OK  ]




 

This is what I have in my conf pertaining to virt hosts:



Code:
<VirtualHost *:80>
ServerName undergroundinfection.net
ServerAlias undergroundinfection.net
ServerAdmin tek@undergroundinfection.net
DocumentRoot /path/to/main
</VirtualHost>

<VirtualHost *:80>
ServerName mail.undergroundinfection.net
DocumentRoot /path/to/main/uinmail
</VirtualHost>




 

It doesn't break the server it just doesn't change anything either. Am i doin something wrong or maybe not doing something at all?

did you uncomment the NameVirtualHost line?
no i didn't, but I just did since you brought it to my attn. It seems to be working properly . Now all I gotta do is fiddle with some configuration in the mail server because it can't find it's own pages on the new vhost. thanks for the help guys.