Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: 404 page not found #86

Closed
ghost opened this issue Jun 2, 2016 · 25 comments
Closed

ERROR: 404 page not found #86

ghost opened this issue Jun 2, 2016 · 25 comments

Comments

@ghost
Copy link

ghost commented Jun 2, 2016

After i've clone project and cd to laradock folder, then run command:
docker-compose run -d nginx mysql. I got an error on terminal:

Creating network "laradock_default" with the default driver
ERROR: 404 page not found

-docker version

Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.2.1
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.2.1
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

-docker-compose version

docker-compose version 1.7.1, build 0a9ab35
docker-py version: 1.8.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013

How fix this issue? Thank advaned!

@Mahmoudz
Copy link
Member

Mahmoudz commented Jun 2, 2016

you should run this command instead: docker-compose up -d nginx mysql. (just replace run with up)

@koenverburg
Copy link

Im running docker-compose up -d nginx I only need a php 7 env. and I change the application volume to point to my laravel app, but I also get a 404. when I login to my workplace container there is nothing

@ken-master
Copy link

ken-master commented Jun 18, 2016

this happens to me too. i just follow the installation guide. and used

docker-compose up -d nginx mysql

OS: Ubuntu 16.04

docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64

docker-compose version
docker-compose version 1.7.1, build 0a9ab35
docker-py version: 1.8.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013

still having this issue..

@gongchengra
Copy link

docker-compose down
and
docker-compose up -d nginx mysql
again,
it works for me.

@lolalf
Copy link

lolalf commented Oct 8, 2016

Is there a solution for this?
I have the same problem on Ubuntu 16.04.
I tried installing laradock on Ubuntu 16.04. Everything went well but after docker-compose up -d nginx mysql phpmyadmin, i get 404 error on localhost, localhost:8080 works for phpmyadmin.

@philtrep
Copy link
Member

philtrep commented Oct 9, 2016

@lolalf
if the solution above doesn't work, please post your logs here

@kayrules
Copy link

kayrules commented Dec 1, 2016

I had this problem because the root path in docker-compose.yml differs from the one in nginx default.conf file:

applications:
        image: tianon/true
        volumes:
            - ../:/var/www

So I solved this issue by changing a line in file laradock/nginx/sites/default.conf from:

root /var/www/public;

to

root /var/www;

@tucq88
Copy link

tucq88 commented Dec 27, 2016

Thanks @kayrules .
I think it should be mentioned in README :D

@appleboy
Copy link
Member

appleboy commented Dec 27, 2016

@kayrules Where is your laravel public folder? 404 page not found should not happen on laravel project but it always happens on CodeIgniter project if your index.php file in /var/www folder.

@ganlub
Copy link

ganlub commented Jan 10, 2017

Same thing happened to me, I was going crazy with the 404...
Either - ../:/var/www becomes - ../:/var/www/public on docker-compoe.yml or the Nginx default site configurations needs to be updated.

@coffeeneed
Copy link

coffeeneed commented May 8, 2017

@kayrules fix worked for me too. Thanks a lot!

Now, the realistic WTF question:
Why is this crucial fix hidden here? I mean; it had to be somewhere, so let me rephrase:
Why isn't this bug fixed? As of today, Laradock for Windows doesn't work and that's pretty damn bad. You might as well remove it from your site or roll back to alpha or beta.

I appreciate we're a community and we solve stuff together, but we're 5 month deep in 2017 and this isn't touched. The OP made this post mid 2016, damnit.

I do understand I'm obligated to read your docs, but your quick start help is 5 steps long and ends with:

That's it! enjoy :)

If you have a quick start guide it should work. If not, you don't have a quick start guide and refer to the deeper docs.

Rant end.

@arcnetdev
Copy link

eu estou com o mesmo problema, 404

@arcnetdev
Copy link

I have the same problem, 404

@snowshoes
Copy link

Thanks @kayrules , after retry for hours, it finally works!
You saved my day!
Even today this problem still remains in v4.x

@ghost
Copy link
Author

ghost commented Oct 14, 2017

@kayrules God Yes!!! I tried to deploy wordpress with laravel but i stucked with this problem. and your solution made this worked!
As @tucq88 said, It should be mentioned in readme file for no-laravel-users.

@dapseen
Copy link

dapseen commented Mar 14, 2018

@kayrules Appreciate for sharing it, Works for me.

@tucq88 yeah, i support it,... it will help our sanity

@Sogl
Copy link
Contributor

Sogl commented Jul 18, 2018

This problem still exists in last version

@rickkuilman
Copy link

Can confirm, this is still an issue. Fix by @kayrules works: #86 (comment)

@evgpisarchik
Copy link

Same for me

@itsgarryb
Copy link

Can confirm the issue is still there. The fix mentioned by @kayrules worked for me too ( #86 ).

@kamal2222ahmed
Copy link

issue is still there for me, and #86 did not seem to have fixed it
Docker version 18.09.0, build 4d60db4

@hghotra
Copy link

hghotra commented Jan 13, 2019

@kamal2222ahmed Just confirmed that fix by @kayrules works with:
Docker version 18.09.0, build 4d60db4

Look for APP_CODE_PATH_HOST in your .env and make sure there's an index.php file where that points. By default it's set to ../.

@surj08
Copy link

surj08 commented Mar 9, 2019

I think I had this problem with codeIngiter for another reason. In case anyone else has problems with the documentation:

1 - Open the docker-compose.yml file.
2 - Change CODEIGNITER=false to CODEIGNITER=true.
3 - Re-build your PHP-FPM Container docker-compose build php-fpm.

There is no CODEIGNITER=false in the file. Adding it with true does still produce the desired effect.

      - CODEIGNITER=true

Then rebuild php-fpm

docker-compose build php-fpm

as @kayrules said I also had to change the nginx config or put the files in ../public

@tripex
Copy link

tripex commented Jul 12, 2020

Still a problem

@engmsaleh
Copy link

Still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests