Redirection www

NethServer Version: NethServer release 7.7.1908
Module: PhpMyAdmin SoGo Email

Hi all.

I have a problem on the redirection www.
I have created a virtual host
On my ISP i have setup the DNS www and http to redirect to ip public of nethserver.
If i wrote the site appear.
but if i write i see the " Congratulations, your NethServer installation is up and running!"
Same problem with https://www but not with https://

Thank’s for your help

I have insert this on on the last line :

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^(?:www.)?(.+) [NC] RewriteRule ^.* https://www.%1%{REQUEST_URI} [L,NE,R=301]

www redirect to
http redirect to https://
http:// to https://

but redirect to the Congratulations, your NethServer installation is up and running!



Try this:

There is no * option under virtual hosts, so you need to define all names you want it to appear under…

My 2 cents

And unfortunately, there’s no way (other than manually hacking on the templates) to set a “preferred” FQDN–such that the host would answer to both and, but if you browse to, it would redirect to I’d like this to be in the panel, but I have no idea how to code it there.

this is two examples of redirections in e-smith templates

expand /etc/httpd/conf.d/ and restart/reload httpd

1 Like

Thank’s for your help.

I have add www on cockpit.
Enabled SSL required.
And after i have add www. on a new request of let’s encrypt certificat.

And all are OK.

Thank’s all !