Welcome to WebmasterWorld Guest from 22.214.171.124
On my local PC (running XP Pro), I've installed Apache 2.2.3, PHP 5.2.0, phpMyAdmin 2.9.1., and mySQL 5.0.22. I had no problem getting them up and running together. I'm also running Dreamweaver 8.2. IIS is disabled.
I own several top level domains and want to set up several domains on my test server, with various combinations of subdomains and subdirectories. Some will be ecommerce sites, some forums, and some blogs. The forums and blogs are likely to be subdiretories off my TLDs (e.g., www.mysite.com/blog) whereas the subdomains are more for the ecommerce sites to segregate product types (e.g., chevy.carparts.com, ford.carparts.com).
I've dug into various forums, books, etc. and still am not sure how to set up the structure in Apache. I've found bits and pieces but they all don't even agree with each other and sometimes seem to conflict. I want the structure to duplicate the host server and so started with the htdocs directory at the root level (i.e., c:/htdocs). I know localhost is my local host and that will be part of the URL for my test sites. I think I have to set up a virtual host for each TLD but what about the subdomains and subdirectories? What should my directory structure look like for the above car directories? What about if I add a subdirectory for a forum to one of them (e.g., ford.carparts.com/fordforum)?
Do I use URL redirection so the URL I type in on my local test server matches that of my hosting service? I want to be able to use the features of Dreamweaver to FTP from my test servers to the host servers and don't want to have the paths get out of synch when I FTP to the host. And I know that once the Apache directories are set up, I'll have to define the structure to Dreamweaver... but one thing at a time.
Thanks for any advice.
You are not forced to use "localhost" as the domain name. You can use anything.
Check [support.microsoft.com...] section "Adding Static Clients to the Hosts File".
Simply, edit the file "%SystemRoot%\System32\Drivers\Etc\Hosts", with the notepad, and add something like:
(you can replace "127.0.0.1", by your local network, or Internet IP address, if your Apache server is bound to these IP addresses...)
Now, in Apache, create virtual hosts, and use the "ServerName" directive, to specify which domain to use, for the current virtual host, like "subdomain1.your-domain.tld.test", and you will be able to use "http://subdomain1.your-domain.tld.test/", in your Web browser.
For directories, I don't understand what you need. Can't you simply put the blog in "htdocs/blog/", and the forum, in "htdocs/forum"? There is no Apache configuration needed for this (you might have to configure the blog/forum, to specify their URL path, "/blog", and "/forum", if they do not detect it automatically).
[edited by: Mathieu_Bonnet at 4:26 pm (utc) on Dec. 21, 2006]