TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   setup sub domain on wamp? (http://www.talkphp.com/general/2170-setup-sub-domain-wamp.html)

sarmenhb 02-01-2008 10:45 PM

setup sub domain on wamp?
 
how do i setup a subdomain on wamp?

something like http://test.localhost

im using windows xp

thnx

Orc 02-01-2008 11:07 PM

In the http.conf, there will be VirtualHosts.

Alan @ CIT 02-01-2008 11:21 PM

Step by step guide :-)

1. Browse to: C:\Windows\System32\drivers\etc and open the file called 'hosts' in any text editor. You should see 1 or more lines that have an ip address, then the hostname. Eg:

Code:

127.0.0.1      localhost
Add a new line to it with something like:

Code:

127.0.0.1      test.localhost
Then save and close the file.

2. Open up httpd.conf from the Wamp tray icon menu and scroll down until you find:

Code:

#Include conf/extra/httpd-vhosts.conf
And un-comment it by removing the '#' from the start of the line.

3. Open up: C:\wamp\bin\apache\apache2.2.6\conf\extra\httpd-vhosts.conf. You should find 2 demo virtual hosts in there - dummy-host.localhost - and - dummy-host2.localhost - delete the second one (the entire block), then edit the first one to your needs. Just change "dummy-host.localhost" to "test.localhost" (or whatever you called it in the Hosts file, then adjust the www / log paths as needed.

And finally, restart Apache and all should be fine. If you run into problems after the restart, check the Apache error log. You may also need to restart your PC for Windows to pickup the changes you made to the Hosts file.

Alan

paullstanley 06-25-2011 04:09 AM

Here is a really in depth, simple tutorial on setting up virtual hosts and subdomains publicly and locally on wamp: http://www.itutorblog.com/2011/06/ho...omain-on-wamp/


All times are GMT. The time now is 01:58 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0