title: Setting document root for Laravel project on Apache virtual host
body: <p>I inherited a php/Laravel app that was running on an Apache server that I don't have access to. My task is to get it running on another Apache server. I'm pretty good with php but relatively new to Laravel and very new to Apache configuration. </p>
  
  <p>I have figured out how to get the Laravel app running on Apache that is running on an Ubuntu VM (VirtualBox.) I can access the Laravel app in a browser on the Ubuntu VM via <a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>. I can also access the Laravel app in a browser from the Internet via <a href="http://appname.com/public" rel="nofollow noreferrer">http://appname.com/public</a>. However, if I just use <a href="http://appname.com" rel="nofollow noreferrer">http://appname.com</a>, then I just get a folder listing of /var/www/appname. </p>
  
  <p>I have tried several modifications to the /etc/apache2/available-sites/appname.conf file but haven't quite got it right yet, apparently. I have also read a number of posts around the nets about making modifications to various other config files including php config files and Apache config files. It seems like these other mods (while they may be workable) shouldn't be necessary. </p>
  
  <p>Here is my current /etc/apache2/available-sites/appname.conf</p>
  
  <pre><code>    &lt;VirtualHost *:80&gt;
          ServerAdmin webmaster@localhost
          ServerName appname.com
          ServiceAlias www.appname.com
          DocumentRoot /var/www/appname/public
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
      &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Any advise is appreciated.</p>
  
  <ul>
  <li>Bob</li>
  </ul>