Apache - 404 Not Found
<p>Good Afternoon,</p>

<p>I'm elaborating a project and I've instaled php,mysql, apache2 in a virtualbox with ubuntu16.04. I'm working locally and I've instaled laravel 5.3, I have an API running and created a new virtual host and placed the <code>DocumentRoot my_folder/public</code> and <code>ServerName name_virtual_host</code>. Then I went to my host files and placed a new line: <code>127.0.0.1 name_virtual_host</code>. When I place on my browser <a href="http://name_virtual_host" rel="nofollow noreferrer">http://name_virtual_host</a>, the laravel page appears like it is supposed, but when I type in <a href="http://name_virtual_host/api" rel="nofollow noreferrer">http://name_virtual_host/api</a>, it gives back:</p>

<blockquote>
  <p>Not Found</p>
  
  <p>The requested URL /api was not found on this server.</p>
  
  <p>Apache/2.4.18 (Ubuntu) Server at name_virtual_host Port 80 it used to
  appear JSON.</p>
</blockquote>

<p>my virtual Host: </p>

<pre><code>&lt;VirtualHost *:80&gt;
        ServerAdmin webmaster@localhost
        ServerName name_virtual_host
        DocumentRoot /var/www/my_folder/public
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
&lt;/VirtualHost&gt;
</code></pre>

<p>if inside my folder I write the comand </p>

<blockquote>
  <p>php artisan serve</p>
</blockquote>

<p>and put in URL:</p>

<blockquote>
  <p>name_virtual_host:8000/api</p>
</blockquote>

<p>, this works.</p>

<p>How can I solve this?
I think that the solution is creating the file .htaccess, but what should I put inside this file(.htaccess)?</p>

<p>Thanks.</p>