Forum Moderators: phranque

Message Too Old, No Replies

vhost configuration query

problem with vhost addressing

         

unishell

11:22 am on Jun 23, 2007 (gmt 0)

10+ Year Member



Relatively new to apache web server config so may really be simple problem.

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?

jdMorgan

10:18 pm on Jun 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



At least two possibilities:

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