Sub-Domains?
Posted by: Nicholas (---.tstt.net.tt)
Date: December 18, 2005 08:37PM

Hi there, I was thinking about on How to add a sub-domain to be reached at: subdomain.localhost can someone tell me how do this and if it is possible.

Thanks!

Options: ReplyQuote
Re: Sub-Domains?
Posted by: George (---.pwayne01.pa.comcast.net)
Date: December 18, 2005 09:36PM

Step 1:
Edit the file located in C:\windows\system32\drivers\etc\hosts

add the following to it
127.0.0.1 subdomain.localhost

Save File


Step 2:
Edit the httpd.conf file

Add the following to the bottom of the file

##########################
NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www"
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\subdomain"
ServerName subdomain.localhost
ErrorLog logs/subdomain_error.log
</VirtualHost>
###########################

Step 3:
You must make sure the subdomain directory exists. If not create one.
Restart Apache server

Options: ReplyQuote


Sorry, only registered users may post in this forum.