Friday, 19 August 2016

Debugging with apache and nginx on RHEL / CentOS

nginx

To enable debug mode on nginx we will need to firstly verify that the '--with-debug' parameter was included at compile time - to check issue:

nginx -V | grep "--with-debug"

If so, you can simply append 'debug' to the relevant error log definition within your server node e.g.

error_log /var/log/nginx/sites/example.com/error.log debug;

and reload the system:

sudo systemctl nginx reload

apache

To enable debugging with apache you will need to find (or add) the 'LogLevel' directive to your httpd.conf file e.g.:

vi /etc/httpd/conf/httpd.conf

and add:

LogLevel debug

Finally reload the service:

sudo systemctl httpd reload

0 comments:

Post a comment