I’ve been trying to get cms_pico working on my Nextcloud 13 instance for the past couple of days. I can’t seem to get the nginx rewrite rule to work.
I’m starting from the Nginx configuration located at:
https://docs.nextcloud.com/server/13/admin_manual/installation/nginx.html.
My user root contains a “blog” folder with the sample Pico site. With no additional configuration, feeding $server_name/apps/cms_pico/pico/blog to the browser works just fine and shows the index.md file in blog/content.
I placed the following location block right below the two deny locations:
location ~ ^/sites/ {
rewrite ^/sites/(.*) /apps/cms_pico/pico/$1;
}
Now I expect that using $server_name/sites/blog in the browser will be turned into the url above and work. I am baffled that it does not. The page shown by this url is the root page of the files app.
Enabling rewrite_log and debug shows that the /sites/blog url is processed correctly. The rewrite rule is applied. Then the / location is used to prepend /index.php to the new url. Then I see /app/files appearing and getting processed and I have no idea where it came from.
Could someone please help me figure out what I am missing?
Thanks