YunoHost / packages_old

[not used anymore] YunoHost Debian package sources
http://yunohost.org
8 stars 7 forks source link

Nginx redirection to https conflicts with subdomains #27

Closed dolanor closed 10 years ago

dolanor commented 10 years ago

Hello, I have a yunohost configured on my server (in a LXC). I also have a deis installed (in a vagrant). All the default port for yunohost are forwarded from my main host to the yunohost LXC (ports 80, 443, 25, imap, pop, etc). To access my deis, I need a port 80 connection. Therefore, I configured a subdomain block for deis dev.domain.com that proxy everything going from *.dev.domain.com to deis vagrant IP.

My problem is :

I tried to fix it, but I don't know really what to do since the server blocks seem right. I think it must be the SSOWat that makes a permanent 301 redirect https://github.com/YunoHost/packages/blob/master/yunohost-config-nginx/config/template.conf#L6

My current workaround is to check my deis app by going on a temporary profile on chromium. But it is very annoying.

dolanor commented 10 years ago

I found the problem. In fact it wasn't SSOwat the culprit, but the nginx configuration with the HSTS. The includeSubdomain forces any subdomain to connect to https directly. Without even connecting to http first and be redirected instead.

I will try to make deis work with https because of the cookie stealing issue from a subdomain. If I can't, I will simply remove the includeSubdomains.