laravel-opcache: Laradock - Failed to connect to localhost port 80: Connection refused
I’m using laradock and trying to run php artisan opcache:clear in the workspace container where my projects are located. Any ideas?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (6 by maintainers)
For anyone who uses Laradock for local development, I fixed this problem by changing
/etc/hostsof workspace container.First, use
docker psand find Nginx container ID. Then rundocker inspect NGINX_CONTAINER_IDand find"IPAddress"in output.Enter the workspace container.
Edit
/etc/hosts:vi /etc/hostsand add your Nginx IP and your website virtual host like this:Which in my case was:
If you have opcache enabled already, then you need to restart nginx. Else try to run
composer dump-autoload -o,php artisan clear-compiled,php artisan cache:clearandphp artisan optimize