How can I use xdebug to debug only one virtual host?

回眸只為那壹抹淺笑 提交于 2019-12-18 02:49:32

问题


I have installed xdebug, I can see in phpinfo() that it's installed (but it's OFF).

However, I don't want to enable it for the whole server/apache2, I just want to enable it for one virtual host.

How can I do this?


回答1:


You can set xdebug in php.ini with off value:

zend_extension=/usr/lib/php/modules/xdebug.so
xdebug.remote_enable off
xdebug.remote_port 9000
xdebug.idekey PHP-XDEBUG

and turn on only .htaccess with directive:

php_flag   xdebug.remote_enable on


来源:https://stackoverflow.com/questions/15423705/how-can-i-use-xdebug-to-debug-only-one-virtual-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!