Configuring Nginx for Pico CMS

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

1 Like

Curious to know if you figured out a solution for this? I’m running into the same issue with the pico-cms app after creating a new site, having the link take me back to the root page of the files app

Also have you tried solutions found here? Just in case your issue is something different from my own.

Sorry! Nothing new to add. In fact, I stopped trying.

:frowning:

I followed these instructions and had no problems.
https://www.c-rieger.de/nextcloud-meets-picocms/

This page no longer works/loads Can you tell us what you found, that fixed your problem?

Found the answer here.

Sorry. Did not take notes. I think you can contact him directly.

Roland

Skickat från min Samsung Galaxy-smartphone.

-------- Originalmeddelande --------