WampServer
Apache, PHP, MySQL on Windows
Home forum
Back to WampServer
presentation
Downloads
Addons
Trainings
Alter Way
Go to Topic:
Previous
•
Next
Go to:
Forum List
•
Message List
•
New Topic
•
Search
•
Log In
•
Print View
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:
Reply
•
Quote
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:
Reply
•
Quote
Go to:
Forum List
•
Message List
•
Search
•
Log In
Sorry, only registered users may post in this forum.
Click here to login