Hi!
I run a (new) webserver, and have recently tried to add subdomains via
the Virtual Hosts directive in the httpd.conf file.
I want to have a subdomain mail.server.com. To di so I have made the
following modifications in httpd.conf:
<VirtualHost 192.168.1.2:80>
ServerAdmin
(E-Mail Removed)
DocumentRoot /www/mail
ServerName mail.server.com
ErrorLog /var/log/apache/mail_error_log
CustomLog /var/log/apache/mail_error_log common
</VirtualHost>
192.168.1.2 is the fix IP of my server within the network.
IT worked, when trying mail.server.com the page from /ww/mail was
displayed. But
www.server.com also pointed to mail.server.com.
Then I tried to add www explicitly:
NameVirtualHost
www.server.com
<VirtualHost 192.168.1.33:80>
ServerAdmin
(E-Mail Removed)
DocumentRoot /www/
ServerName server.com
ServerAlias
www.server.com
ErrorLog /var/log/apache/mail_error_log
CustomLog /var/log/apache/mail_error_log common
</VirtualHost>
NameVirtualHost mail.server.com
<VirtualHost 192.168.1.2:80>
ServerAdmin
(E-Mail Removed)
DocumentRoot /www/mail
ServerName mail.server.com
ErrorLog /var/log/apache/mail_error_log
CustomLog /var/log/apache/mail_error_log common
</VirtualHost>
But now mail.server.com displays the page from
www.server.com
What am I missing? How can I sucessfully add the mail.server.com
subdomain to resolve to /www/mail?
Thanks in advance, guys!
--
Michael
r-znvy: zvpunry.wryqra jro.qr (chg gur "@" jurer vg svgf...)
ab fcnz cyrnfr