title: Laravel 5.4 - Routes not working
body: <p>I've setup a fresh ubuntu mini  installation and installed apache2 and PHP. (also tried it with latest stable ubuntu)
  I've also installed some moduls, amongst others the moduls listed in the <a href="https://laravel.com/docs/5.4" rel="nofollow noreferrer">laravel installation documentation</a>: </p>
  
  <pre><code>OpenSSL PHP Extension
  PDO PHP Extension
  Tokenizer PHP Extension
  Mbstring PHP Extension
  XML PHP Extension
  </code></pre>
  
  <p>I also installed:</p>
  
  <p><strong>libapache2-mod-php</strong>,<strong>git</strong> and <strong>curl, php-curl</strong>:</p>
  
  <pre><code>sudo apt-get install libapache2-mod-php
  sudo apt-get install curl
  sudo apt-get install php-curl
  sudo apt-get install git
  </code></pre>
  
  <p>Now I copied a whole laravel project from my apache server from windows.
  Then I executed </p>
  
  <pre><code>chmod 775 -R *
  </code></pre>
  
  <p>and</p>
  
  <pre><code>chown www-data:www-data -R *
  </code></pre>
  
  <p>However, the routes are not working.</p>
  
  <p>e.g. <a href="http://192.168.2.100/selenium/public/start" rel="nofollow noreferrer">http://192.168.2.100/selenium/public/start</a></p>
  
  <p>Should show my start page, instead I get: </p>
  
  <blockquote>
    <p>Not Found: The requested URL /selenium/public/start was not found on this server.`</p>
  </blockquote>
  
  <p>So I researched and found <a href="https://stackoverflow.com/a/16899065/4684797">this</a> on stackoverflow.</p>
  
  <p>From the answer:</p>
  
  <blockquote>
  <pre><code>Try to navigate to your expected route prepend it with /index.php/, in
  your case: http://localhost/laravel/index.php/users. 
  If it works (no 404) then you problem is with the Rewrite Module configuration of
  Apache HTTP, you should follow the next steps.
  </code></pre>
  </blockquote>
  
  <hr>
  
  <p>So I tried to call my page like suggested:</p>
  
  <pre><code>http://192.168.2.100/selenium/public/index.php/start
  </code></pre>
  
  <p>That worked. So there is a problem with the Rewrite Module Configuration.</p>
  
  <p>He/She suggested to add <code>RewriteBase /directory/</code> under the line <code>RewriteEngine On</code> in <code>public/.htaccess</code></p>
  
  <p>So I changed my <code>public/.htaccess</code> to this and restarted apache2:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      RewriteEngine On
      RewriteBase /selenium/
  
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)/$ /$1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  
      # Handle Authorization Header
  
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>However, the routes are still not working.
  What else can I try?</p>
  
  <h2><strong>System Infos</strong></h2>
  
  <p><strong>Apache version:</strong></p>
  
  <blockquote>
  <pre><code>Server version: Apache/2.4.7 (Ubuntu)
  Server built:   Jul 15 2016 15:32:47
  </code></pre>
  </blockquote>
  
  <p><strong>PHP version:</strong></p>
  
  <pre><code>PHP 7.0.16-4+deb.sury.org~trusty+1 (cli) (built: Mar  2 2017 13:50:00) ( NTS )
  Copyright (c) 1997-2017 The PHP Group
  Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
      with Zend OPcache v7.0.16-4+deb.sury.org~trusty+1, Copyright (c) 1999-2017, by Zend Technologies
  </code></pre>
  
  <p><strong>Linux version:</strong></p>
  
  <blockquote>
    <p>Linux linux 3.13.0-110-generic #157-Ubuntu SMP Mon Feb 20 11:55:25 UTC
    2017 i686 i686 i686 GNU/Linux</p>
  </blockquote>