I've got problems with setting up Remote Web Server Debugging with Xdebug. I keep getting 404 error:
but actually Xdebug is being detected correctly:
How are machines setup
- Laptop and Desktop PC are connected in the same network
- Laptop has Ubuntu 18 installed and I'm using it as server
- There is a Docker on laptop with file sync but this doesn't matter at this point
- PhpStorm is on my Desktop PC,
- Vsftpd is configured correctly, files edited on Desktop are being sent on laptop and page data is being update in container,
- my website works locally at 192.168.1.103
What works fine at this point
- FTP connection with laptop,
- SFTP connection with laptop,
- SSL,
- SSH connection from desktop via for example Git Bash,
- Xdebug itself works fine on laptop.
What I already tried
Checking out forwarding/tunnel for SSH Xdebug and PhpStorm remote does not work
- well, the last command frezzes the console on Ubuntu but I can make SSH connection from git bash without problems from Desktop
Following this : https://help.ubuntu.com/community/SSH/OpenSSH/Configuring. I've tried turning this settings on, since were off:
AllowTcpForwarding yes X11Forwarding yes
Tried to change settings for both php.ini and xdebug.ini, (both and apart)
zend_extension=/usr/lib/php/20170718/xdebug.so xdebug.remote_autostart = 1 xdebug.remote_enable = 1 xdebug.remote_handler = dbgp xdebug.remote_host = 127.0.0.1 xdebug.remote_log = /tmp/xdebug_remote.log xdebug.remote_mode = req xdebug.remote_port = 9005
- I've tried with changed remote host to the IP on which website works, didn't helped.
- Also Apache
DocumentRoot
was setup on/var/www
while my project was somewhere else so I move project to/var/www
and still nothing - but works OK on given IP above.
I'm out of ideas at this point.
P.S. I'm newbie to Linux.
I:\Projecty\website-scrapper
doesn't get into/var/www
, or the URL is wrong. Iswebsite-scrapper
==/var/www
? 3.xdebug.remote_host = 127.0.0.1
would not work because in Xdebug, it's the remote host that initiates a connection. It should be an IP the laptop can use to connect to the laptop. – Eugene Morozov