Linux-Noob Forums
setting up mail.blahblah.com - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html)
+--- Forum: SMTP (https://www.linux-noob.com/forums/forum-86.html)
+--- Thread: setting up mail.blahblah.com (/thread-2382.html)



setting up mail.blahblah.com - tek-69 - 2005-10-13


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?




setting up mail.blahblah.com - seeno - 2005-10-13


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>







setting up mail.blahblah.com - tek-69 - 2005-10-14


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?




setting up mail.blahblah.com - hijinks - 2005-10-16

did you uncomment the NameVirtualHost line?



setting up mail.blahblah.com - tek-69 - 2005-10-16

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.