-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xdebug on Mac needs nginx REMOTE_ADDR set #733
Comments
Got xdebug works with |
That's because nginx + php in dlaravel is in same docker container. In laradock the IP gets rewritten by nginx container, so php container doesn't get the correct remote address. Setting REMOTE_ADDR fixes that. |
@novalis111 It works now, thanks 😄 I changed the directive orders below.
|
#393 (comment) here is more classy solution =) |
what should i put instead of 192.168.1.51 ? the ip address where i have the IDE ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi again 👋 we would like to inform you that this issue has been automatically |
I tried to get xdebug working on a Mac, setting my local IP (192.168.1.51) as DOCKER_HOST_IP in .env. Remote Debugging on CLI worked, but Web Debug did not.
But xdebug wouldn't connect to the docker host. The problem is in the nginx server config, where you have to pass the IP of the host as REMOTE_ADDR:
I couldn't figure out how to set it from .env though, nginx only accepts IP addresses here. After setting that, the xdebug connection worked flawlessly. Would be great to add this to your PHPStorm guide. I think this is a Mac Problem, b/c the routing is done differently.
The text was updated successfully, but these errors were encountered: