Hello everyone!
I’m trying to install Traefik on my temporary domain (freenom).
Before the installation of Traefik and portrainer both www.mydomain and http://mydomain was working.
After the installation of Traefik and Portrainer my app become unavailable and https not working. I followed @George ’s tutorial, but I think I’m doing something wrong.
To install, I removed the port 80 from my project settings (production target), deployed and then installed ok.
After installation:
Browser acessing with https:
What am I missing?
George
October 17, 2020, 10:42am
2
Well if even ping is not resolving your domain then something is wrong with your domain registration and dns.
So check with freenom
Thanks, George!
But it was working before https/traefik/portrainer installation
I’m using Digital Ocean, did you set name servers on Freenom in your tutorial?
Ping for my domain using www
Acessing with www
George
October 17, 2020, 12:13pm
4
well if you want to access it with www - then you should make sure www is also specified in your project settings, in the remote target as wel server url.
Currently you can have just one - with or without www.
See:
Actually this is not a bug, but a question of site setup - what you want to do in case you want a site to respond on both with and without www and what you really want to happen.
There are many scenarios possible, following up some basic questions:
do you want your site to be available on both domains without and with www?
notice that those are two different domains! So they have separate cookies. This means that if user logs in to the www domain and then go to the site without www, different…
Thanks one more time, George!
Just add www to my web server URL.
bpj
October 17, 2020, 4:24pm
6
There is a workaround if you want to enable www. and non-www:
Thanks @george , I know these can be a small can of worms. Maybe domains could be added but only if they redirect to the ‘master’ domain via htaccess? That way cookies etc. will only nee to be served for one domain but would allow the most common www/non-www issue to be resolved.
For now, as a workaround, I added:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.mydomain.com [NC]
RewriteRule ^(.*)$ https://mydomain.com/$1 [R=301]
to the htaccess file and then altered the docker-compose.yml file …
1 Like