Announcement

Collapse
No announcement yet.

Espocrm Bad Server Response

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

  • Espocrm Bad Server Response

    Hey Guys,

    I have installed espocrm on my local mac, i have used a web server called Valet (created for Laravel Dev but works with any php application). The installation has been completed however when i visit the application url i get bad server response, please see attached screenshot.

    Anyone can help please, what env you have set up for mac to allow espocrm installation ?

    Many thanks
    Rabii
    Attached Files

  • #2
    Hello, in your root folder go to data/logs and look for the log file. There might be some more information, that you could post here.
    As I read about Valet, it needs drivers to run php script. Maybe you will have to write your own driver for espoCRM: https://laravel.com/docs/8.x/valet#custom-valet-drivers

    Or you use this local server: https://www.mamp.info/de/mac/
    Last edited by shalmaxb; 05-26-2021, 09:32 PM.

    Comment


    • #3
      i have tried valet custom driver but i couldn't do it, i am not evening sure how espocrm get bootstrapped, there is no public folder. i tried the code for a custom driver as below :

      <?php

      class BasicPHPValetDriver extends ValetDriver
      {
      /**
      * Determine if the driver serves the request.
      *
      * @param string $sitePath
      * @param string $siteName
      * @param string $uri
      * @return bool
      */
      public function serves($sitePath, $siteName, $uri)
      {
      return true;
      }

      /**
      * Determine if the incoming request is for a static file.
      *
      * @param string $sitePath
      * @param string $siteName
      * @param string $uri
      * @return string|false
      */
      public function isStaticFile($sitePath, $siteName, $uri)
      {
      if (file_exists($staticFilePath = $sitePath.'/'.$uri) && is_file($staticFilePath)) {
      return $staticFilePath;
      }

      return false;
      }

      /**
      * Get the fully resolved path to the application's front controller.
      *
      * @param string $sitePath
      * @param string $siteName
      * @param string $uri
      * @return string
      */
      public function frontControllerPath($sitePath, $siteName, $uri)
      {
      // Shortcut for getting the "local" hostname as the HTTP_HOST
      if (isset($_SERVER['HTTP_X_ORIGINAL_HOST'], $_SERVER['HTTP_X_FORWARDED_HOST'])) {
      $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
      }

      $_GET['url'] = $uri;

      return $sitePath.'/index.php';
      }
      }

      also tried MAMP but didn't work, any tips.

      Help please
      Thanks
      Rabii

      Comment


      • #4
        I've never heard of needing to write a driver for a web server to host content. Why not use a different, more popular and robust web server software instead of the one you're using? Platforms such as Apache or Nginx are tried & true for good reason, especially a good idea since EspoCRM is recommended on these and that's what you're trying to deploy.

        We personally use a LAMP stack; Ubuntu v20, Apache, MySQL, PHP. Plenty of guides out there showing you out to deploy an Apache local server on a Mac OS system too. And as always when building a web server, logs are your best friend!!

        Comment

        Working...
        X