Need help on nginx conf - cannot access resources

Hello,
I’m very new to this so excuse me if my question is silly…
My app has following folder structure:
…/app/www/
…/app/lib/
…/app/somefiles.php

File index.php is in /app/www
Resource files are in /app/lib/, such as png and other php files.

Now, when I load the app site, php script are all correctly executed but image files are not shown with error “cannot load image”
As all authorization on the app folder are for www-data, and files can be read by anybody, I assume it comes from the nginx conf file.
Here it is, right from the template:

location /app {
        # Path to source
        alias /var/www/app/www/ ;
        # Example PHP configuration
        index index.php;
        try_files $uri $uri/ index.php;
        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.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;
        }

        # Include SSOWAT user panel.
        include conf.d/yunohost_panel.conf.inc;
}

but I can’t figure out what to change??

Quite simple in fact:

    location /app {
            # Path to source
            alias /var/www/app/ ;
            # Example PHP configuration
            index www/index.php;
1 Like

Having a same issue with my apps if anyone here have solutions to that kindly inform me please. post it here