YunoHost / issues

General issue tracker for the YunoHost project
71 stars 8 forks source link

document common use case: (1) make default wordpress (2) redirect www #1518

Open pedro-nonfree opened 4 years ago

pedro-nonfree commented 4 years ago

Hi,

I found complex to solve this problem, and I think documentation should improve in this direction

this documentation helped https://forum.yunohost.org/t/dns-config-for-my-domain-redirect-www/7783/5

I think we should have a page explaining documentation to set up a wordpress in a domain example.com as default application, and a redirect in www.example.com to example.com

let me start a draft (substitute example.com with your domain):

check that it went fine with curl:

 $ curl -I www.example.com
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Sun, 16 Feb 2020 13:54:04 GMT
Content-Type: text/html
Content-Length: 154
Connection: keep-alive
Location: https://example.com
Neustradamus commented 4 years ago

@alexAubin: The best solution is to redirect automaticaly www.domain.tld to domain.tld and block "www" like subdomain, no?

alexAubin commented 4 years ago

@Neustradamus : that's what was proposed in https://github.com/YunoHost/issues/issues/249 ... Didn't think hard enough about it to have an opinion on if that's the right thing to do or not and if it's worth it ... (On the technical side, I doubt that it's as simple as adding a line in nginx's conf)

Neustradamus commented 4 years ago

@alexAubin: Thanks in advance! And maybe with a feature to disable this forced redirection too but never enable by default.