EspoCRM fails to install

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.14
What app is this about: EspoCRM

Describe your issue

The Yuno install works fine but the post-install…install…gives the below errors:

Share relevant logs or error messages

API Error: EspoCRM API is unavailable.

Add this code to your Nginx server config file /etc/nginx/sites-available/YOUR_SITE inside “server” section:

server {
    # ...

    client_max_body_size 50M;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location /api/v1/ {
        if (!-e $request_filename){
            rewrite ^/api/v1/(.*)$ /api/v1/index.php last; break;
        }
    }

    location /portal/ {
        try_files $uri $uri/ /portal/index.php?$query_string;
    }

    location /api/v1/portal-access {
        if (!-e $request_filename){
            rewrite ^/api/v1/(.*)$ /api/v1/portal-access/index.php last; break;
        }
    }

    location ~ /reset/?$ {
        try_files /reset.html =404;
    }

    location ^~ (api|client)/ {
        if (-e $request_filename){
            return 403;
        }
    }
    location ^~ /data/ {
        deny all;
    }
    location ^~ /application/ {
        deny all;
    }
    location ^~ /custom/ {
        deny all;
    }
    location ^~ /vendor/ {
        deny all;
    }
    location ~ /\.ht {
        deny all;
    }
}

Yunobump

Who can I pay to fix this?

Try the testing branch with sudo yunohost app upgrade espocrm -u https://github.com/YunoHost-Apps/espocrm_ynh/tree/testing and gives feedback

Hi,
How did you get this message ? It seems to me this conf file should be located in /etc/nginx/conf.d/<yourEspoCRMdomain>/espocrm.conf. I also think you should reinstall.

The directory came from the application itself.

No such luck.

It says nothing there either. What is the proper syntax for the domain? I tried https://subdomain.domain.com and subdomain.domain.com and there was no file for either.

It’s not normal that Yunohost didn’t create these files. Afaik there should be two of them:

  • /etc/nginx/conf.d/yourEspoCRMdomain.conf
  • and /etc/nginx/conf.d/yourEspoCRMdomain.d/espocrm.conf.

You can copy given code into the second one, but the best option would be to reinstall, as something clearly went wrong.

Reinstalled with no luck. There’s also this error when setting it up, not sure if this is pertinent:

I also set access permissions to all Yunohost users when installing, not sure if that’s pertinent either.

/etc/nginx/conf.d/yourEspoCRMdomain.d/espocrm.conf also says “no such file or directory”, although my question regarding the domain syntax stands.

Also I accessed this page using the dedicated domain, so it seems strange that there would be an NGINX problem…

You can fix this easily: nano /etc/php/8.3/fpm/pool.d/espocrm.conf (php version may be different)
set php_admin_value[memory_limit] = 256M
add

php_admin_value[max_execution_time] = 180
php_admin_value[max_input_time] = 180

Then systemctl restart php8.3-fpm && systemctl reload nginx and refresh page.

What’s the dmain name where you installed espoCRM ?

Thanks, that resolved that issue.

Not really comfortable with disclosing more than https://subdomain.domain.com publicly.

And this path

/etc/nginx/conf.d/subdomain.domain.com.d/

doesn’t exist ?

It says “is a directory” but there’s nothing there:

Can you share the output of ls /etc/nginx/conf.d/subdomain.domain.com.d/ ?

espocrm.conf

I think this is the file we’re looking for, so I just copy the code that it gave me into this file?

Yes. But I don’t understand why the content of this file would be empty if it was generated.

It wasn’t empty. I dunno what’s going on but I went ahead and deleted/pasted it. Now it seems to have forgotten it’s Host Name:

It was probably unnecessary… Did you check if the data was different? This file is auto-generated during the installation of an application and normally contains the correct settings.

For the hostname, set localhost.

Yes, I did check that the data was different. set name to localhost but still getting the same error :sob: