Hi there,
I’m currently working on packaging a new app (namely domoticz) for yunohost.
I got a lot of stuff working but I still cannot access to the app page via yunohost.
A 302 redirection occurs that send me back to the yunohost home page.
According to nginx domoticz documentation, the nginx conf file requires this line:
rewrite ^/domoticz/?(.*) /$1 break;
I’m not good at all at regex, but it seems to command something like : redirect all query to mydomain.tld/domoticz/whatever to mydomain.tld/domoticz/whatever
When I let this line, I land back to yunohost user page
If I delete this line, I land on a 404 page.
According to a test I made on another server (without nginx nor yunohost), I should be redirected to mydomain.tld/domoticz/#/Dashboard
The server is up and running on an internal http port, no log neither in nginx nor in domoticz ones, ssowat is skipping this URL for the tests.
Any hints would be much appreciated.
Here is the full nginx conf file:
rewrite ^/domoticz$ /domoticz/ permanent;
location /domoticz/ {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
rewrite ^/domoticz/?(.*) /$1 break;
proxy_http_version 1.1;
proxy_read_timeout 90;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded_Proto $scheme;
proxy_set_header X-Scheme $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://localhost:8092;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
EDIT : When I set the app on the root domain (mydomain.tld instead of mydomain.tls/domoticz/), this is working