#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://127.0.0.1:__PORT__; proxy_redirect off; } location ~ ^/(css|img|js|fonts)/ { root __FINALPATH__/static; # Optionally cache these files in the browser: # expires 12M; } location __PATH__/ { proxy_pass http://localhost:__PORT__; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_redirect off; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; }