<p>Your index.php file should be found under the <code>web</code> directory. All of the other files and folders installed by composer are considered to be above the root which is recommended for security reasons.</p>

<p>Place all of your css, js, images, etc into the <code>web</code> folder and create your twig files in the <code>templates</code> folder and you shouldn't need to edit your index.php file, but <code>web</code> is essentially where it lives. This folder can be renamed to public, httpdocs, or anything you wish. It will be used by your set up as the public root of the domain. I hope that helps.</p>

CC BY-SA 4.0
2018-07-26T14:08:44.880Z
2018-07-26T14:08:44.880Z
Matt Shearing
<p>This is on Centos 7.5 using a vmware local vm</p>

<p>Installed Apache, MariaDB 10.2, PHP 7.1 (Remi) in that order</p>

<p>Logged in as root, no sudo or su</p>

<p>Installed composer 1.6.5 without issue</p>

<blockquote>
  <p>cd /var/www/html
  composer create-project craftcms/craft .
  ./craft setup
  No errors or warnings after confirming "yes" to "Install Craft now?"</p>
</blockquote>

<p>I had the same problem trying to install from the archive manually but I figured I might have done something wrong so I set up a clean new LAMP VM and used only composer. I appreciate any help.</p>

<p>Directory contents below</p>

<blockquote>
  <p>[root@localhost html]# ll
  total 128
  -rw-r--r--  1 root root    387 Jul 17 13:37 composer.json
  -rw-r--r--  1 root root 100025 Jul 26 15:02 composer.lock
  drwxr-xr-x  3 root root     88 Jul 17 13:37 config/
  -rwxr-xr-x  1 root root    577 Jul 17 13:37 craft*
  -rw-r--r--  1 root root    330 Jul 17 13:37 craft.bat
  -rw-r--r--  1 root root    926 Jul 26 15:06 .env
  -rw-r--r--  1 root root    875 Jul 17 13:37 .env.example
  -rw-r--r--  1 root root     31 Jul 17 13:37 .gitignore
  drwxr-xr-x  2 root root     24 Jul 17 13:37 modules/
  drwxr-xr-x  4 root root     51 Jul 26 15:02 storage/
  drwxr-xr-x  2 root root     40 Jul 17 13:37 templates/
  drwxr-xr-x 28 root root   4096 Jul 26 15:02 vendor/
  drwxr-xr-x  3 root root     77 Jul 17 13:37 web/</p>
</blockquote>

CC BY-SA 4.0
2018-07-26T15:35:06.143Z
In respond to Matt's helpful comment (thank you), I reinstalled clean and moved the /web files to /var/www/html and now http://localhost/index.php?p=admin renders a blank screen. I would have expected an admin panel -- not that I know for sure based on the Craft's description.
Glen Ulmer
CC BY-SA 4.0
2018-07-27T12:43:19.520Z
You will be seeing a white screen due to the nesting level of the index.php file. So if you moved the web files to /var then it should have worked. If you are required to have these files nested at /var/www/html though then you could either install craft to the /var/www folder, or go into your index.php file and update the CRAFT_BASE_PATH on line 7. The default is to look for the craft files 1 folder above where the index.php file sits, you could modify this though to look 3 folders above itself and that should get it to work.
Matt Shearing
<install><composer>
No index.php file created during install using composer
# No index.php file created during install using composer

(Asked by: username_0 on 2018-07-26)

This is on Centos 7.5 using a vmware local vm

Installed Apache, MariaDB 10.2, PHP 7.1 (Remi) in that order

Logged in as root, no sudo or su

Installed composer 1.6.5 without issue

> cd /var/www/html
> composer create-project craftcms/craft .
> ./craft setup
> No errors or warnings after confirming "yes" to "Install Craft now?"

I had the same problem trying to install from the archive manually but I figured I might have done something wrong so I set up a clean new LAMP VM and used only composer. I appreciate any help.

Directory contents below

> [root@localhost html]# ll
> total 128
> -rw-r--r-- 1 root root 387 Jul 17 13:37 composer.json
> -rw-r--r-- 1 root root 100025 Jul 26 15:02 composer.lock
> drwxr-xr-x 3 root root 88 Jul 17 13:37 config/
> -rwxr-xr-x 1 root root 577 Jul 17 13:37 craft\*
> -rw-r--r-- 1 root root 330 Jul 17 13:37 craft.bat
> -rw-r--r-- 1 root root 926 Jul 26 15:06 .env
> -rw-r--r-- 1 root root 875 Jul 17 13:37 .env.example
> -rw-r--r-- 1 root root 31 Jul 17 13:37 .gitignore
> drwxr-xr-x 2 root root 24 Jul 17 13:37 modules/
> drwxr-xr-x 4 root root 51 Jul 26 15:02 storage/
> drwxr-xr-x 2 root root 40 Jul 17 13:37 templates/
> drwxr-xr-x 28 root root 4096 Jul 26 15:02 vendor/
> drwxr-xr-x 3 root root 77 Jul 17 13:37 web/

**Tags:** install, composer

> **Comments:**
> **username_0**: In respond to Matt's helpful comment (thank you), I reinstalled clean and moved the /web files to /var/www/html and now http://localhost/index.php?p=admin renders a blank screen. I would have expected an admin panel -- not that I know for sure based on the Craft's description.  
> **username_1**: You will be seeing a white screen due to the nesting level of the index.php file. So if you moved the web files to /var then it should have worked. If you are required to have these files nested at /var/www/html though then you could either install craft to the /var/www folder, or go into your index.php file and update the CRAFT_BASE_PATH on line 7. The default is to look for the craft files 1 folder above where the index.php file sits, you could modify this though to look 3 folders above itself and that should get it to work.  

---

## 1 answers

### Answer by username_1 on 2018-07-26. Score: 3 | Accepted answer

Your index.php file should be found under the `web` directory. All of the other files and folders installed by composer are considered to be above the root which is recommended for security reasons.

Place all of your css, js, images, etc into the `web` folder and create your twig files in the `templates` folder and you shouldn't need to edit your index.php file, but `web` is essentially where it lives. This folder can be renamed to public, httpdocs, or anything you wish. It will be used by your set up as the public root of the domain. I hope that helps.


---

