Issue with making a website the default

When you make a website the default which is already the alphabetically first virtual host name, its entry in /etc/apache/sites-enabled does not get renamed to "0-...", but stays as it is.

While this is okay for the moment, it'll be a problem when you create a new domain that's alphabetically before that.

Status: 
Closed (fixed)

Comments

The issue here is that Virtualmin already thinks that the alphabetically first website is the default, so it won't offer the option to make it the default.

The work-around is to make another site the default, then make the alphabetically first site the default again. This will result in it getting a 0-whatever.com filename.

Yep that's right, I used this workaround indeed.

I'd suggest that Virtualmin, only assumes that a site is the default when it's name presently IS "0-*", since it uses that naming scheme to actively make a site the default.

The way it is now can be misleading/confusing, and if you don't know that naming scheme thing and/or don't check what the file is named currently, you can easily fall for that.

The UI would be a bit confusing in that case though - for the domain that is alphabetically first, it is actually the default.

Yes that's right... But I think it's worse if the term "default" here is used for both what Apache uses as default, and what Virtualmin configures as default by renaming it to "0-".

The biggest issue is when you rely on the GUI saying that a site is the default, and think that stays the case even if you create arbitrary new sites, and then find our, oops no it wasn't the "hard default" after all. This has happened to me before!

Maybe if the UI indicated that a site is only the default by chance, and gave you the option to make it the guaranteed default?

Yes, that'd be perfect!

Ok, I'll fix this for the next release.

Automatically closed -- issue fixed for 2 weeks with no activity.

Automatically closed -- issue fixed for 2 weeks with no activity.