2

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/

  • In respond to Matt's helpful comment (thank you), I reinstalled clean and moved the /web files to /var/www/html and now 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 Jul 26 '18 at 15:35
  • 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 Jul 27 '18 at 12:43
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.