I have tried dozens of guides and read ton of information but I still can't find a fix for my problem. I have uninstalled, reinstalled and checked and double checked every possible issue.
The problem remains. No matter what change I make, document root ALWAYS show up as c:\wamp\www.
Even if I change the httpd.conf DocumentRoot to another path it still shows up as c:\wamp\www
What is strange is if the vhost was set up wrong, my index.php should not display. But in fact it does. And I have a line of code to echo the $_SERVER['DOCUMENT_ROOT']
and it ALWAYS shows as c:\wamp\www and not to ANY of the vhosts document roots I have assigned.
So the pages load, of course with errors. My pages ALL reference $_SERVER['DOCUMENT_ROOT']
and ALL work perfectly on my live sites.
So the bottom line is I have checked my configs backwards and forwards. / vs. \, hosts file is correct, document root paths are correct and point to actual folders that contain the correct files. I have played with every "standard" and non-standard possibility of config.
There must be some other element that's keeping this from working. Please help if you can.
Please don't suggest I try another config. I have tried them all.
Please tell me you know why this is happening and how to fix it. I have on script that almost did the trick but feel just short of the fix. I left a message for the poster and have not heard back from him.
I hope somebody here has a fix and not a suggestion to try yet another config. Unless you KNOW of the issue and have a fix, please don't reply. That might sound rude, but I have seen and tried all the configs.
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot C:\wamp\www\itsaboutwirelessnetworks
ServerName itsaboutwirelessnetworks.localhost
ServerAlias itsaboutwirelessnetworks
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot C:\wamp\www\computerstore
ServerName computerstore.localhost
ServerAlias computerstore
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot C:\wamp\www
ServerName localhost
ServerAlias localhost
</VirtualHost>
Is the config. Why can't I edit with carriage returns in comments?