apache viurtual hosts
From: upro (upro_at_gmx.net)
Date: 11/25/04
- Next message: Davide Bianchi: "Re: apache viurtual hosts"
- Previous message: Wolf: "Re: Poweredge server and RAID"
- Next in thread: Davide Bianchi: "Re: apache viurtual hosts"
- Reply: Davide Bianchi: "Re: apache viurtual hosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Nov 2004 13:09:19 +0100
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 mailmaster@server.com
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 root@server.com
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 mailmaster@server.com
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
- Next message: Davide Bianchi: "Re: apache viurtual hosts"
- Previous message: Wolf: "Re: Poweredge server and RAID"
- Next in thread: Davide Bianchi: "Re: apache viurtual hosts"
- Reply: Davide Bianchi: "Re: apache viurtual hosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|