4

I have setup a laradock app on my local machine. I have followed the instructions as provided: http://laradock.io/

In addition to that as I am on Windows 10, and using Docker toolbox, I have shared my folder with the laradock's workspace. That's working fine as I can see my app's folders inside the workspace when I run the following command

docker-compose exec workspace bash

I have also added a host entry inside my hosts file on windows. 127.0.0.1 localhost

But nothing works. I get a response 'localhost refused to connect'. Even css files inside public folder are not accessible

SanketR
  • 1,182
  • 14
  • 35

1 Answers1

-1

You should checkout the nginx/sites folder inside your laradock folder. Check the root path inside default.conf - root /var/www/public; should correspond to where your project /public folder actually is inside workspace.

I personally use laradock for many projects and create multiple .conf files that correspond to my sites name like myproject1.test - myproject1.conf and my file structure is like that:

/laradock
/myproject1
/myproject2

hosts file:

127.0.0.1 myproject1.test
127.0.0.1 myproject2.test

myproject1.conf inside nginx/sites:

...
server_name myproject1.test;
root /var/www/myproject1/public;
...

Hope that helps

  • I've been encountering the same issue, the question mentions difficulty specifically for Windows - I think part of the problem is that the Laradock Nginx config shows the `root` directory in Unix format – jarodsmk Jul 08 '19 at 05:35