web alias server with https redirection

Hi, when I create a alias server with web feature enabled, Virtualmin only create the http virtualhost with the RedirectPermanent directive (I'm using the option "Create alias websites by: Creating permanent Redirect virtual host" in the template for alias servers). It causes that redirection from https:/aliasdomain.com to parentdomain.com doesn't work.

Only the http virtualhost is created in the alias domain even when the parent domain has SSL enabled.

The Let's Encrypt certificate for the parent domain is updated to add the alias domain, so later is easy to add manually a second virtualhost for the alias domain with SSL.

Does not virtualmin has that feature (adding both virtualhost http/https for the alias domain) or are something wrong in my systems?

thanks in advance, Nodo50

Status: 
Closed (fixed)
Virtualmin version: 
6.14
Webmin version: 
1.962

Comments

This looks like a bug in the "Creating permanent Redirect virtual host" mode - it should really support SSL properly in the special alias redirect domain.

Is there a reason you're using that mode though, versus the default of adding an Apache alias to the main domain?

Hi, I use the redirect instead of a ServerAlias to avoid duplicate content. Show the same content with different URL cause issues with search engines https://moz.com/learn/seo/duplicate-content

Or sometimes the alias domain will be deleted in some months (the customer want to permanent change the main domain) and a 301 redirect is better for search engines, to force them to move search results to the new main domain.

I only use the ServerAlias method when the site hosts a multisite wordpress (or something similar). The CMS shows different content depending of the hostname used to access and you need the same DocumentRoot for all URL (one unique CMS installation).

Makes sense - I'll update this ticket with progress on fixing this issue

FYI, the next release of Virtualmin will fix this by allowing redirects from HTTP to HTTPS that preserve the hostname when it's an alias domain.

Status: Fixed ยป Closed (fixed)

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