Laradock: Cant serve index.php - 404 not found

Created on 13 Apr 2018  路  1Comment  路  Source: laradock/laradock

Info:

  • Docker version ($ docker --version): 17.12.0-ce, build c97c6d6
  • Laradock commit ($ git rev-parse HEAD): 0c41fceae1b23089f5360dc4f8aeb85719c7bf5a
  • System info (Mac, PC, Linux): Linux
  • System info disto/version: Linux Mint - 4.10.0-38-generic #42~16.04.1-Ubuntu

Issue:

404 not found error when going to http://localhost/ after following the getting started guide


Expected behavior:

Be able to see my index.html or index.php file that I created in the project folder


Reproduce:

  • Follow getting started guide
  • docker-compose up -d nginx mysql workspace
  • create a index.html file in the project folder
    Try going to http://localhost/

Relevant Code:

I bashed into workspace and nginx and both containers can see the index.html file at /var/www/

I know this question is pretty basic. But if following the getting started guide doesn't get a user up and running maybe something needs to be changed.

EDIT: I moved a laravel app to the folder and it does work as expected! If somebody can explain what I am missing I'd greatly appreciate it.

Most helpful comment

nginx' webroot is configured to be /var/www/public, which maps to ../public, relative to laradock's root. A Laravel installation in the parent directory would have this directory, but your basic test fails. Had the same issue just recently ;-)

>All comments

nginx' webroot is configured to be /var/www/public, which maps to ../public, relative to laradock's root. A Laravel installation in the parent directory would have this directory, but your basic test fails. Had the same issue just recently ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ejblom picture ejblom  路  3Comments

ConstantinChirila picture ConstantinChirila  路  3Comments

fuzzyjared picture fuzzyjared  路  3Comments

danielsdeboer picture danielsdeboer  路  3Comments

dioseltorre picture dioseltorre  路  3Comments