Error retrieving pid file logs/httpd.pid – Apache Error Solved

You might run into a scenario where while trying to restart apache service with the help of Linux operating webhosting services, you receive an error:

(20014)Internal error: Error retrieving pid file logs/httpd.pid
Remove it before continuing if it is corrupted.

There is nothing to worry regarding it, you need to run the commands as follow to get apache working again.

Rename httpd.pid or remove it from the logs directory of apache (/usr/local/apache/logs/) and restart the apache service.

root@server [~]# cd /usr/local/apache/logs/
root@server [/usr/local/apache/logs]# mv httpd.pid httpd.pid.bak
root@server [/usr/local/apache/logs]# /etc/init.d/httpd restart

After doing this The Apache service would start working fine.