Forum Moderators: phranque
Have configured two virtual hosts:
eg.
ServerName www.my-old-apachewebsite.co.uk
DocumentRoot /srv/www/htdocs
and
ServerName www.my-new-apachewebsite.co.uk
DocumentRoot /srv/www/htdocs
pointing my browser at either URL takes me to the web site as expected. All OK.
If I then:
change the DocumentRoot on the second virtual host entry to say, /srv/www/htdocs/this_dir/that_dir,
install a new index.html file in that location,
restart apache, and
point my browser at www.my-new-apachewebsite.co.uk
I'm still seeing the site as before - i.e. its still pointing me at the original DocumentRoot, not my new one.
Am I doing something invalid?
Is there another entry in the httpd.conf file that needs amending, or that's overriding my second virtual host DocumentRoot setting?
1) You're seeing cached pages: Did you completely flush your browser cache?
2) You've got a config problem in the code that you didn't post above, and the server is defaulting to the first named vHost, as documented here [httpd.apache.org].
Jim