404 strange problem

2 posts / 0 new
Last post
#1 Tue, 05/22/2012 - 17:34
donnell

404 strange problem

Reposted here from Virtualmin forum as I guess more appropriate.

Hi,

I run a Virtualmin 3.92 GPL on Ubuntu 10.04 with 4 virtual servers on it.

I am experiencing a strange behaviour with missing pages as follows.

When I try to open www.anysite.com/does-not-exist I get a standard/personalized 404 error page

But when I try to open a non existant 3rd level domain, such as does-not-exist.anysite.com, I am always redirected to the home page of my first virtual server.

I have looked at all redirects but have not found anything suspicious.

I am lost, and any help would be greatly appreciated.

Best regards,

George

Fri, 08/03/2012 - 15:02
ryanelders

It sounds like your /etc/apache2/sites-enabled/000-default is kicking in and grabbing does-not-exist.anysite.com and pointing it to your home page.

You should be able to fix this by adding *.anysite.com to the ServerAlias for all your virtualhost config files.

Try editing /etc/apache2/sites-enabled/anysite.com and add *.anysite.com as a ServerAlias.

I don't have access to virtualmin right now as my work proxy blocks port 10000 so I cannot tell you where to edit ServerAlias from virtualmin. Maybe you can find it.

www.ryanelders.com

Topic locked