title: How to configure apache web server to deploy laravel 5
body: <p>I would like to serve my Laravel application on my local apache web server. However, I am having issues.</p>
  
  <p>To test if the application I made would work on an apache server, I have created a new very simple application which contains two routes.</p>
  
  <pre><code>Route::group(['middleware' =&gt; 'web'], function() {
      Route::get('/', function() { return view('myview'); });
      Route::get('/link', function() { return view('myotherview'); });
  });
  </code></pre>
  
  <p>When I enter my <code>public</code> directory from my browser, it works fine, it connects to the <code>/</code> route. But when I give a link to the other route (<code>/link</code>), and try enter that route, it gives me 404 not found the error. Here is the link I give in my <code>myview</code> view to reaching <code>/link</code> route:</p>
  
  <pre><code>&lt;a href="{{ url('/link') }}"&gt;Go&lt;/a&gt;
  </code></pre>
  
  <p>When I show the source of the page, the above line is rendered as <code>localhost/mylaravelapp/public/link</code>.</p>
  
  <p>I have researched this issue on the internet and there are a couple of suggestions on enabling apache mod_rewrite. I have also done that by typing <code>a2enmod mod_rewrite</code>. However this isn't seemed to be working, getting the same result. How can I solve this issue?</p>
  
  <p>My laravel version is 5.2, apache 2.4.7 and I am using xubuntu 14.04.</p>