Hello,
I am having some problems with apache 2 and getting subdomains working. I thought I had everything right.
OS: Windows Xp
Server: Apache/2.0.50 (Win32) PHP/5.0.0 DAV/2 Server
Here is what i have in httpd.conf
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
#NameVirtualHost 127.0.0.1:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#
# First VirtualHost acts as a "catchall" for when nothing else matches
#
#
#
# main site (localhost)
# also catches anything that doesn't have a Host: header we recognise
<VirtualHost *:80>
ServerName localhost:80
DocumentRoot "C:/www"
ServerAdmin
jordon.bedwell@coldfusionzone.com
ErrorLog logs/localhost_error.log
CustomLog logs/localhost_access.log combined
</VirtualHost>
# sqladmin (sqladmin.localhost)
<VirtualHost *:80>
ServerName sqladmin.localhost:80
DocumentRoot "C:/www/config/phpmyadmin"
ServerAdmin
admin@php-helper.com
ErrorLog logs/sqladmin.localhost_error.log
CustomLog logs/sqladmin.localhost_access.log combined
</VirtualHost>
<Directory C:/www/>
Options All
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
# jordonbedwell host (sqladmin.localhost)
<VirtualHost jordonbedwell:80>
ServerName jordonbedwell.localhost:80
DocumentRoot "C:/www/sites/jordonbedwell/html_public"
ServerAdmin
admin@php-helper.com
ErrorLog logs/jordonbedwell.localhost_error.log
CustomLog logs/jordonbedwell.localhost_access.log combined
</VirtualHost>
<Directory /www/sites/jordonbedwell/html_public>
Options All
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
Here is what I have in the hosts file for windows:
127.0.0.1 localhost
www.localhost jordonbedwell.localhost
www.jordonbedwell.localhost sqladmin.localhost
www.sqladmin.localhost
127.0.0.1 sqladmin.localhost
www.sqladmin.localhost
127.0.0.1 jordonbedwell.localhost
www.jordonbedwell.localhost
# p.s. You can specify wild-cards within an hosts file so
# if need some subdomains you need to add them by hand code
Thank you ahead of time!
Jordon Bedwell