location {LOCATION} { alias {DESTDIR}/web/; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } index app.php; try_files $uri @wallabag; location ~ ^{PATH}/app\.php(?:$|/) { include fastcgi_params; fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_pass unix:/var/run/php5-fpm-{POOLNAME}.sock; fastcgi_intercept_errors on; } # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } location @wallabag { rewrite ^ {PATH}/app.php?$request_uri; }