mr_pseudonym — 2013-01-29T04:34:11-05:00 — #1
I'm doing my experimenting in WAMP, which of course contains the site that I am working on in a folder called WWW.
If I want to start putting together a second site, how do I do that? Make another folder called WWW2 ? Will whatever functions that WAMP has to operate on the website files be able to find them in WWW2?
Or do I rename the first site's folder WWW1 and make a new folder for WWW? And progressively have a series of WWWx folders for a series of websites, from which I rename off the number to activate one or the other?
I could try it but I'm afraid of blowing up 500 pages that I've worked on for years.
Thank you kindly.
serverstorm — 2013-01-29T15:51:53-05:00 — #2
You typically create a new folder for each website under the www folder. Examples of two sites:
Above you have two site folders, abc and def. You could then structure folders inside abc and def:
// Site abc.com
// Site def.com
You then need to ensure that Wamp is configured to use named hosts. If this is configured then you need to edit the httpd.cof to ensure that your virtualhosts include is active (is not commented out), like:
# Virtual hosts
If the vhosts configuration files is enabled then navigate to and open it.
You then create two virtual hosts like this:
allow from all
allow from all
Then you need to restart Wamp.
Finally you need to alter your host file windows/system32/etc/hosts
If you need to find out more, there are hundreds (if not thousands) of tutorials on creating multiple site under WAMP or setting virtual hosts. Google is you friend
picnictutorials — 2013-01-29T17:22:35-05:00 — #3
Here is a good link on how. http://cesaric.com/?p=255
markbrown4 — 2013-01-29T18:06:08-05:00 — #4
I have mine setup like this http://christianvarga.com/blog/2012/05/vhosts-and-mamp/ very similar to what ServerStorm suggested.
picnictutorials — 2013-01-29T18:09:06-05:00 — #5
I did not want to move all my websites into the www folder. So I create a virtual site like the above link shows. Basically you just point wamp at wherever your site currently lives. This way you don't have to move anything.
dklynn — 2013-01-30T03:17:21-05:00 — #6
SS has just completed this with a very stubborn member in another thread but his information is spot on!
As for the directory, using any directory on your computer (test server) became the standard with Apache 2.x (it HAD to be in the htdocs folder in Apache 1.x ... if I remember correctly). Personally, I keep all my virtual hosts (and other web-related files) on a separate partition (so I can keep it separated from other nonsense - easier to backup all my websites that way).