Hi guys, just installed mysql/apache/php perfectly thanks to the help of this (the best ever) forum,
I have one further question, I’ve made doc root point to d:\websites\ and copied the ‘It Works’ index.html to that directory and edited it to say ‘It Really Works’.
Problem is, when I go to localhost it seems to still be pulling the index.html from /htdocs/ in the apache directory.
Only place I’ve added d:\websites\ is the doc_root in my php.ini
Can anyone please tell me what I’m missing?
Edit: nevermind I’m a complete moron and found the DocumentRoot lines in httpd.conf… sorry for the wasted thread.
Good object lesson to others. However, you’ve missed the real TREAT of having your own test server: VirtualHosts! Create a virtual host (use the template in the extras/httpd-vhosts.conf file) and be sure to update the Windows\system32\drivers\etc\hosts file (use their template, i.e., 127.0.0.1 local_domain_name).
This sounds like what I have been looking for. Right now, my Windows file has
127.0.0.1 localhost
That is followed my very many lines inserted by Spybot - Search & Destroy.
It sounds like I can change this to look like:
127.0.0.1 localhost
127.0.0.1 website01 #localhost/website01
127.0.0.1 website01 #localhost/website02
etc.
And I also modify httpd.conf by adding:
NameVirtualHost *:80
Yes, you ALMOST understood right. I’d drop the www. and .tld to use locally - although I’ve abbreviated domains for local use, i.e., datakoncepts.com has become dk (locally). Also, it’s better to use <VirtualHost 127.0.0.1:80>, i.e, specify the localhost’s IP address to be sure it can only be accessed locally (you DON’T want to open your computer to the outside!).
If I understand correctly, to keep from confusing things with the actual website, I can change the .com to anything?
I could have site01.xyz and site02.xyz?
I do actually have things running now, but you suggest that I set
<VirtualHost *:80>
to
<VirtualHost 127.0.0.1:80>
By specifying the 127.0.0.1, and am forcing this to be only available from my home network or just the local computer with the file on a local hard drive?