Craft 3 vs Apache directory structure I am new to Craft CMS and am struggling with what and how to get the correct files in the right places. I started out with a LAMP stack on a Ubuntu 18.04 Digital Ocean droplet and proceeded with the Craft CMS setup. Currently I get a 404 ERROR stating "The requested URL /index.php was not found on this server".

Where should I put it? Does this answer help and still work in this case : https://stackoverflow.com/questions/5891802/how-do-i-change-the-root-directory-of-an-apache-server/23175981#23175981?

My VH file:

&lt;VirtualHost *:80&gt;
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/craftcms
     ServerName example.com
     ServerAlias www.example.com

     &lt;Directory /var/www/html/craftcms/&gt;
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     &lt;/Directory&gt;

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

     &lt;Directory /var/www/html/craftcms/&gt;
            RewriteEngine on
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*) index.php [PT,L]
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;
If the craftcms folder is more or less the out-of-the-box Craft 3 installation, you should be able to just point your Directory blocks and DocumentRoot at /var/www/html/craftcms/web!

Only the web folder is intended to be public—everything else should be hidden, above the web root—think of it as sandboxing access to just one folder of your application.