Hello, everyone!
When I type in the “http://www.mydomain.com.br”, I can access my site with no problem.
The problem is when I don’t type the www, the site won’t work, leading me to the “APache2 Ubuntu Default Page”.
I tried to force redirection via .htaccess, by including this:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Restarted Apache, with no luck. The problem persists.
I have to tell you all, before that, I was getting a Certificate Error, and then I put this first line in my apache2.conf:
ServerName amantesdocarnavalsp.com.br
The certificate problem was vanished, but I can’t access my site without the “www”.
Can you help me solve the problem? I believe there’s to ways to solve it: by .htaccess redirection or by some configuration on apache2.conf, but no idea what to do.
Thank you!
Edit: I’m using Ubuntu 14.04, webmin 1.801, Virtualmin 5.03, Intel® Xeon® CPU E5-2620 v3 @ 2.40GHz, 4 cores