title: Laravel passport 500 internal server error on EC2
body: <p>I'm building an app using Angular 2 (no known as 4) as frontend and Laravel 5.4 as API backend. I'm using Laravel's passport password grant feature to authenticate user access to API. </p>
  
  <p>The Frontend is not directly accessing oauth routes. My custom auth controller is talking to oauth/token to get the grant values. </p>
  
  <h2>This setup is working perfectly fine in my local environment, but in AWS EC2 it throws 500 internal server error.</h2>
  
  <p>I thought it could be related to GuzzleHttp\Client, but it was not. Even if I try to access oauth/token directly from Postman, it still throws 500 internal server error.</p>
  
  <pre><code>private function getPasswordGrant($username, $rawPassword) {
      $http = new HttpClient();
      $url = url('/') . "/oauth/token";
      return $http-&gt;post($url, [
          "form_params" =&gt; [
              "grant_type"    =&gt; "password",
              "client_id"     =&gt; config("auth.oauth_password_grant_client_id"),
              "client_secret" =&gt; config("auth.oauth_password_grant_client_secret_key"),
              "username"      =&gt; $username,
              "password"      =&gt; $rawPassword,
              "scope"         =&gt; "*",
          ],
      ]);
  }
  </code></pre>
  
  <p>This is the function in my custom Auth Controller which requests for password grant after the user being authenticated in another method (login and signup).</p>
  
  <p>Most amazing thing is there's nothing logged in either laravel or apache logs.</p>