location __PATH__ { alias __FINALPATH__/; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } index index.html; try_files $uri $uri/ /index.html; include conf.d/yunohost_panel.conf.inc; } location ~ ^__PATH__/(data|config|\.ht|db_structure\.xml|README) { deny all; }