- Plesk Onyx for Linux
All websites are inaccessible. Error 500 is shown in browser.
Apache status command shows the following output:
# service httpd status
httpd dead but subsys locked
/var/run/httpd is missing from file system.
While mod_fcgi is installed, directory
/var/run/mod_fcgi is missing from file system.
Corrupted Apache installation. Some critical directories are missing.
2. Stop Apache service, if it is not stopped:
# service httpd stop
3. Remove lock file:
# rm -f /var/lock/subsys/httpd
4. Manually create missing directories and assign proper permissions and ownership:
# mkdir -p /var/run/httpd
# chown root:apache /var/run/httpd
# chmod 0755 /var/run/httpd
# mkdir /var/run/mod_fcgid
# chown apache:apache /var/run/mod_fcgid
# chmod 0755 /var/run/mod_fcgid
5. Check if selinux is enabled. If selinux mode is enforcing, restore selinux contexts:
enforcing <--- mode is Enforcing
# restorecon /var/run/httpd
# restorecon /var/run/mod_fcgid
6. Start Apache service:
# service httpd start