New domains created are always 301 moved permanently

I've just upgraded to Virtualmin 3.99 gpl, and also upgraded to Apache 2.2.14 on Ubuntu 10.04.4 and now all new virtual domains created (on a shared IP) are redirecting to my "default" domain.

This happens even with a "bare" domain viewed with Virtualmin > Services > Preview Website.

This is also happens with a site restored from a Virtualmin backup, Older sites that have not been newly created or restored since the upgrade are still working.

I've been caught in the past with 301 redirects being cached in my browser, but that doesn't seem to be the case here - the problem's still there when viewed in different browsers, via a proxy etc.

In the Apache conf files for the affected domains I see some new directives RemoveHandler .php RemoveHandler .php5 php_admin_value engine Off which are puzzling but don't seem to make much difference (whether commented out or not).

Any ideas what might be causing this? It's urgent for me because two of my domains are effectively offline because of this.

Status: 
Active

Comments

Howdy -- there's nothing in the new Virtualmin update that should cause what you're seeing. The "RemoveHandler" and php_admin_value lines you're seeing are normal, and are there for security reasons, to prevent PHP from being used in a dangerous manner.

This documentation here may help though, in particular the section "The wrong website shows up":

http://www.virtualmin.com/documentation/web/troubleshooting

It's possible the Apache update added some sort of default config entry that taking precedence, the above documentation should help you to find that if so.

philmck's picture
Submitted by philmck on Wed, 03/20/2013 - 11:49

Many thanks for the prompt response, my sites are back up.

The problem was a VirtualHost *:80 statement at the top of the new apache .conf files. I haven't yet got to the root cause - it used to work and I can't see anything wrong in System Settings -> Virtualmin Config -> Network Settings but it's probably related to running in a Virtuozzo VM.

The troubleshooting doc is very useful and now bookmarked.