Announcement

Collapse
No announcement yet.

404 error on fresh install of Espo on new domain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 404 error on fresh install of Espo on new domain

    I've just installed Espo on a fresh domain and after following all the instructions for configuring for my Nginx server I finally managed to trigger the installation pages. I made it all the way through those to the point where I added a user account but when I then pressed finish it just showed a blank page with a 404 error message.

    If I look in my console I can see the following errors:

    espo.js:11899 Could not open `espo` cache.
    GET http://espo.fsed.co.uk/api/v1/Settings 404 (Not Found)
    GET http://espo.fsed.co.uk/api/v1/I18n?default=true 404 (Not Found)

    espo.fsed.co.uk/:1 Uncaught (in promise) {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
    Promise.then (async)
    (anonymous) @ espo.js:5896
    load @ espo.js:5894
    loadDefault @ espo.js:5906
    init @ espo.js:11936
    (anonymous) @ espo.js:11640
    Promise.then (async)
    l @ espo.js:11640
    (anonymous) @ VM233:25
    _load @ espo.js:528
    require @ espo.js:373
    c.require.Espo.require @ espo.js:919
    (anonymous) @ VM233:24​

  • #2
    Hi Hannah,

    what version of php are you running?
    could you try to install a past version like 7.2.0 and upgrading from there?

    Comment


    • #3
      try to run php rebuild.php from the command line. might be issue with .htaccess

      Comment


      • #4
        Kharg I'm running PHP version 8.2.1

        rabii I tried running that from within the Espo root directory but I'm getting the following error:

        PHP Parse error: syntax error, unexpected '{', expecting identifier (T_STRING) in /var/www/vhosts/fsed.co.uk/espo.fsed.co.uk/rebuild.php on line 32

        I haven't made any edits to that file so not sure why it would be erroring. This is the content of the file:

        include "bootstrap.php";

        use Espo\Core\{
        Application,
        ApplicationRunners\Rebuild,
        };

        (new Application())->run(Rebuild::class);​
        Last edited by Hannah; 01-25-2023, 09:28 AM.

        Comment


        • #5
          Kharg I tried downgrading the PHP but when I do that I just get:

          Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0".

          Comment


          • #6
            I updated my nginx.conf file again and added the following lines:

            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; } }

            After running 'sudo service nginx restart' again it now seems to be working.

            Comment

            Working...
            X