I'm assisting a friend setting up his server @ ThePlanet and I'm running into an issue getting all his domains, etc. configured with apache.
He has site.com and then mail.site.com which need to direct to seperate folders/sites.
Each one has its own IP which I have specified with a vhosts entry for each one specifying name, folder, etc. in the apache config file.
However, when apache reads the file, it will map both sites to the main vhosts entry.
Ex. you type in mail.site.com but site.com loads.
This is a Windows Server 2k3 box with Apache 2.0.55. I have setup apache with localhost and editied the windows hosts file with the appropriate entries to redirect mail.site.com and site.com to 127.0.0.1
What can I do to make the subdomain function properly and redirect both sites to their respective locations?
[/color]
He has site.com and then mail.site.com which need to direct to seperate folders/sites.
Each one has its own IP which I have specified with a vhosts entry for each one specifying name, folder, etc. in the apache config file.
However, when apache reads the file, it will map both sites to the main vhosts entry.
Ex. you type in mail.site.com but site.com loads.
This is a Windows Server 2k3 box with Apache 2.0.55. I have setup apache with localhost and editied the windows hosts file with the appropriate entries to redirect mail.site.com and site.com to 127.0.0.1
What can I do to make the subdomain function properly and redirect both sites to their respective locations?
Code:
NameVirtualHost *:80
[color=white]<VirtualHost site.com>[/color]
[color=white]ServerAdmin [/color][color=white]admin@site.com[/color]
[color=white]DocumentRoot web/site[/color]
[color=white]Servername [url]www.site.com[/url][/color]
[color=white]<Directory "web/site">[/color]
[color=white]Allowoverride none[/color]
[color=white]Options Indexes Multiviews[/color]
[color=white]order allow,deny[/color]
[color=white]Allow from all[/color]
[color=white]</Directory>[/color]
[color=white]</VirtualHost>[/color]
[color=white]<VirtualHost mail.site.com>[/color]
[color=white]ServerAdmin [/color][color=white]admin@site.com[/color]
[color=white]DocumentRoot web/mail[/color]
[color=white]Servername mail.site.com[/color]
[color=white]<Directory "web/mail">[/color]
[color=white]Allowoverride none[/color]
[color=white]Options Indexes Multiviews[/color]
[color=white]Order allow,deny[/color]
[color=white]Allow from all[/color]
[color=white]</Directory>[/color]
[color=white]</Virtualhost>[/color]
[color=white]