Announcement

Collapse
No announcement yet.

API Error: EspoCRM API unavailable

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

  • API Error: EspoCRM API unavailable

    Lock on this step during the installation of espoCRM on my vps. I have done everything as said in the attachement picture but no result.
    If someone got the same issue, please help.

    Regards,
    clouis

  • #2
    It can be disabled .htaccess support ("AllowOverride All"). To check if it's true, please open this page http://<ESPO_LINK>/reset. Do you see this message "Local storage has been cleared.".
    Job Offers and Requests

    Comment


    • #3
      have the same problem, when i open /reset.html, I can see the "Local storage has been cleared." message.
      Espo is at the Apache's root ( /var/www/html )
      Code:
      :/var/www/html# cat .htaccess
      Allow from localhost
      <ifModule mod_headers.c>
        Header always set Access-Control-Allow-Methods "POST, GET, PUT, PATCH, DELETE"
      </ifModule>
      
      DirectoryIndex index.php index.html
      
      <IfModule mod_rewrite.c>
        RewriteEngine On
      
        # PROTECTED DIRECTORIES
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^/?(data|api)/ - [F]
      
        RewriteRule ^/?data/config\.php$ - [F]
        RewriteRule ^/?data/logs/ - [F]
        RewriteRule ^/?data/cache/ - [F]
        RewriteRule ^/?data/upload/ - [F]
        RewriteRule ^/?data/\.backup/ - [F]
        RewriteRule ^/?application/ - [F]
        RewriteRule ^/?custom/ - [F]
        RewriteRule ^/?vendor/ - [F]
        #END PROTECTED DIRECTORIES
      
        RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
      
        RewriteRule reset/?$ reset.html [QSA,L]
      </IfModule>
      Code:
      :/var/www/html# cat api/v1/.htaccess
      RewriteEngine On
      
      # Some hosts may require you to use the `RewriteBase` directive.
      # If you need to use the `RewriteBase` directive, it should be the
      # absolute physical path to the directory that contains this htaccess file.
      #
      RewriteBase /
      
      RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
      
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [QSA,L]
      root@EspoCRM:/var/www/html# cat api/v1/.htaccess
      RewriteEngine On
      
      # Some hosts may require you to use the `RewriteBase` directive.
      # If you need to use the `RewriteBase` directive, it should be the
      # absolute physical path to the directory that contains this htaccess file.
      #
      RewriteBase /
      
      RewriteRule .* - [E=HTTP_ESPO_CGI_AUTH:%{HTTP:Authorization}]
      
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [QSA,L]
      Code:
      :~# grep -vE "^#" /etc/apache2/apache2.conf      
      
      
      
      
      
      Mutex file:${APACHE_LOCK_DIR} default
      
      PidFile ${APACHE_PID_FILE}
      
      Timeout 300
      
      KeepAlive On
      
      MaxKeepAliveRequests 100
      
      KeepAliveTimeout 5
      
      
      User ${APACHE_RUN_USER}
      Group ${APACHE_RUN_GROUP}
      
      HostnameLookups Off
      
      ErrorLog ${APACHE_LOG_DIR}/error.log
      
      LogLevel warn
      
      IncludeOptional mods-enabled/*.load
      IncludeOptional mods-enabled/*.conf
      
      Include ports.conf
      
      
      <Directory />
              Options FollowSymLinks
              AllowOverride None
              Require all denied
      </Directory>
      
      <Directory /usr/share>
              AllowOverride None
              Require all granted
      </Directory>
      
      <Directory /var/www/>
              Options Indexes FollowSymLinks
              AllowOverride All
              Require all granted
      </Directory>
      
      
      
      
      
      
      AccessFileName .htaccess
      
      <FilesMatch "^\.ht">
              Require all denied
      </FilesMatch>
      
      
      LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
      LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
      LogFormat "%h %l %u %t \"%r\" %>s %O" common
      LogFormat "%{Referer}i -> %U" referer
      LogFormat "%{User-agent}i" agent
      
      
      IncludeOptional conf-enabled/*.conf
      
      IncludeOptional sites-enabled/*.conf
      Code:
      :/var/www/html# a2enmod rewrite
      Module rewrite already enabled
      Last edited by BurningD; 02-09-2016, 04:19 PM.

      Comment


      • #4
        Any update on this? I have been through the steps 5+ times and still get the same error message with no hint as to what is causing the problem. Reset.html is good. Rewrite is enabled, and .htaccess is updated. No love.

        This seems to be a common issue and it prevents me from getting started. Perhaps someone with some insight/experience with the code could improve the error messages to help those of us interested in checking out the functionality get started?

        Comment


        • #5
          What PHP version do you use?
          What OS on your webserver?
          Is EspoCRM directory in the www root (/var/www/html)?
          Job Offers and Requests

          Comment

          Working...
          X