Welcome! Log In Create A New Profile


Config file for Picocms on Yunohost with a permanent redirect

Posted by tierce 
Config file for Picocms on Yunohost with a permanent redirect
February 17, 2020 03:01PM

Can you help me to make it working ?

I'm trying to setup url rewriting with Picocms.
When I activate it, it works but I have a 404 on css, js and assets.

Here is my config :

rewrite ^/site$ /site/ permanent;

location /site/ {
alias /var/www/webapp/main_site/ ;
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
index index.html index.php ;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-webapp_main_site.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
# when activated urls are ok /site/content/sub instead of /site/?content/?sub
fastcgi_param PICO_URL_REWRITING 1;

location ~ ^/site/ {
try_files $uri $uri/ /site/index.php$is_args$args;


The css, js, etc are under /var/www/webapp/main_site/themes/default/…
The assets are under /var/www/webapp/main_site/assets/…

I tried to understand how it works, but it's above my understanding and try / test different things was not successful until now.

So some help / advises would be nice.

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready