How to enable xDebug in Nginx

To enable xDebug in your nginx server you just first install xdebug by pecl command.

sudo pecl install xdebug

Now xdebug is installed in your system. Now find exactly where file was downloaded.

You have to find it in /usr/lib/php5/(somewhere in this directory)

Now after find the you have to open your PHP5-FPM’s php.ini file with sudo gedit /etc/php5/fpm/php.ini and add the following command (to locate the xdebug and enabling it).


Now restart your nginx and php5-fpm to load this xdebug. In this same way you can install xdebug for your Apache2.

For apache, setup like the above and after configuring just restart your apache. And you are done!

Shaharia is a professional software engineer with more than 10 years of experience in the relevant fields. Digital ad certified, cloud platform architect, Big data enthusiasts, tech early adopters.

Site Footer