I am redeveloping a WordPress site, and have followed this procedure to copy it to my local machine:
- Copy all files from server to localhost server subdirectory
wp-config.phpwith my local database settings
- Copy server SQL to local database
- Edited my
hostsfile like this:
The problem I have is that when I now go to http://thesiteiamredeveloping.com in my browser, I just get shown an "Index of /" page that lists all the subdirectories in my localhost server (which includes the
How can I make it so that
http://thesiteiamredeveloping.com points to the required subdirectory rather than the server's root directory??
NB - The localhost server I'm using is EasyPHP DevServer 14.1 VC11 - on Windows 7.
I added this to my
<VirtualHost *:80> DocumentRoot "P:/Program Files/EasyPHP-DevServer-14.1VC11/data/localweb/jhtest12.com" ServerName jhtest12.com </VirtualHost>
And I added this to my
127.0.0.1 www.jhtest12.com 127.0.0.1 jhtest12.com
Then I created an
index.html file in the
P:\Program Files\EasyPHP-DevServer-14.1VC11\data\localweb\jhtest12.com folder and restarted the server, but when I try to load
http://jhtest12.com in my browser, it take ages to load before showing the same directory page.
The last section of my
httpd.conf file is...
# Virtual Hosts ## Virtualhost localweb <VirtualHost 127.0.0.1> DocumentRoot "P:/Program Files/EasyPHP-DevServer-14.1VC11/data/localweb" ServerName 127.0.0.1 <Directory "P:/Program Files/EasyPHP-DevServer-14.1VC11/data/localweb"> Options FollowSymLinks Indexes AllowOverride All Order deny,allow Allow from 127.0.0.1 Deny from all Require all granted </Directory> </VirtualHost> Include ../../data/conf/apache_virtual_hosts.conf
...so I have moved the
VirtualHost directive from my
httpd-vhosts.conf file to the
apache_virtual_hosts.conf file, but I'm still having no luck.
In fact, it seems nearly all requests to localhost are not being served correctly - despite me changing all the settings back to their original state, restarting the server, running CCleaner and restarting my computer. What could have broken??