title: Laravel socialite error 404
body: <p>I followed this tutorial on how to use socialite -> <a href="https://laracasts.com/series/whats-new-in-laravel-5/episodes/9" rel="nofollow">https://laracasts.com/series/whats-new-in-laravel-5/episodes/9</a></p>
  
  <p>This is what I've done:</p>
  
  <ul>
  <li><p>Added to my <em>composer.json</em></p>
  
  <p><code>"laravel/socialite": "^2.0",
   "laravelcollective/html": "5.1.*@dev"</code></p></li>
  <li><p>Added to my <em>app.php</em></p>
  
  <p><em>providers</em></p>
  
  <p><code>Laravel\Socialite\SocialiteServiceProvider::class,
   Collective\Html\HtmlServiceProvider::class,</code></p>
  
  <p><em>aliases</em></p>
  
  <p><code>'Socialite' =&gt; Laravel\Socialite\Facades\Socialite::class,
   'Form' =&gt; Collective\Html\FormFacade::class,
   'Html' =&gt; Collective\Html\HtmlFacade::class,</code></p></li>
  <li><p>Added to <em>services.php</em></p></li>
  </ul>
  
  <p><code>'github' =&gt; [
          'client_id' =&gt; 'myid',
          'client_secret' =&gt; 'mysecret',
          'redirect' =&gt; 'http://inspectorhost.app/login',
      ],</code></p>
  
  <ul>
  <li><p>Added to <em>routes.php</em></p>
  
  <pre><code> Route::get('/', function () {
     if (Auth::check()) return 'Welcome back, ' . Auth::user()-&gt;username;
  
    return 'Hi guest. ' . link_to('login', 'Login with Github!');
       });
  
    Route::get('login', 'AuthController@login');
  </code></pre></li>
  <li><p>Created an <em>AuthController</em> and added</p>
  
  <p><code>class AuthController extends Controller
  {
      public function login(){
          return \Socialite::with('github')-&gt;redirect();
      }
  }</code></p></li>
  </ul>
  
  <p>I'm using nginx and I set it up so it doesn't need to use the <em>public folder</em> to acccess the web </p>
  
  <pre><code>   root home/inspectorhost.app/public_html/public/;
  </code></pre>
  
  <p>So when I click on 'Login with Github', instead of sending me to Github to authorize the login, it sends me to /login and gives me a 404 error.</p>
  
  <p><strong>EDIT</strong>
  Now it gets interesting... when I go to <a href="http://inspectorhost.app" rel="nofollow">http://inspectorhost.app</a> and click in 'Login with Github' I get the error from above (404) however if I run <em>php artisan serve</em> and I access the app from localhost:8000 it works... so I guess it might be some misconfiguration on nginx?</p>
  
  <p>Any help is appreciated.</p>