title: Apache Webserver Failed on Centos 7
body: <p>My server is Centos 7 and I set up CWP Web Panel. My Apache Webserver is failed. When i try to restart it, it does not restart. I also try to restart and reboot my server but did not fixed. And i also tried to change Apache with Nginx.</p>
  <p><a href="https://i.stack.imgur.com/yyB0p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yyB0p.png" alt="enter image description here" /></a></p>
  <p>When i click start or restart is show a log like below:</p>
  <pre><code>Job for httpd.service failed because the control process exited with error code. See &quot;systemctl status httpd.service&quot; and &quot;journalctl -xe&quot; for details.
  </code></pre>
  <p>Status is:</p>
  <pre><code>● httpd.service - Web server Apache
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2021-12-16 16:07:36 +03; 29s ago
    Process: 6852 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)
  
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  Dec 16 16:07:36 srv.adayanneler.com apachectl[6852]: (20014)Internal error (specific information not available): AH00058: Error retrieving pid file logs/httpd.pid
  Dec 16 16:07:36 srv.adayanneler.com apachectl[6852]: AH00059: Remove it before continuing if it is corrupted.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: httpd.service failed.
  </code></pre>
  <p>And all logs is like below:</p>
  <pre><code>-- The start-up result is done.
  Dec 16 16:01:01 srv.adayanneler.com CROND[27356]: (root) CMD (run-parts /etc/cron.hourly)
  Dec 16 16:01:01 srv.adayanneler.com systemd[1]: Started Session 2 of user root.
  -- Subject: Unit session-2.scope has finished start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit session-2.scope has finished starting up.
  -- 
  -- The start-up result is done.
  Dec 16 16:01:01 srv.adayanneler.com run-parts(/etc/cron.hourly)[27359]: starting 0anacron
  Dec 16 16:01:01 srv.adayanneler.com run-parts(/etc/cron.hourly)[27367]: finished 0anacron
  Dec 16 16:01:01 srv.adayanneler.com systemd[1]: Removed slice User Slice of root.
  -- Subject: Unit user-0.slice has finished shutting down
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit user-0.slice has finished shutting down.
  Dec 16 16:01:20 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  -- Subject: Unit httpd.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has begun starting up.
  Dec 16 16:01:20 srv.adayanneler.com apachectl[656]: httpd: Could not open configuration file /usr/local/apache/conf/httpd.conf: No such file or directory
  Dec 16 16:01:20 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:01:20 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  -- Subject: Unit httpd.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has failed.
  -- 
  -- The result is failed.
  Dec 16 16:01:20 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:01:20 srv.adayanneler.com systemd[1]: httpd.service failed.
  Dec 16 16:01:21 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:01:25 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:01:25 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:01:34 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  -- Subject: Unit httpd.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has begun starting up.
  Dec 16 16:01:34 srv.adayanneler.com apachectl[5087]: (20014)Internal error (specific information not available): AH00058: Error retrieving pid file logs/httpd.pid
  Dec 16 16:01:34 srv.adayanneler.com apachectl[5087]: AH00059: Remove it before continuing if it is corrupted.
  Dec 16 16:01:34 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:01:34 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  -- Subject: Unit httpd.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has failed.
  -- 
  -- The result is failed.
  Dec 16 16:01:34 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:01:34 srv.adayanneler.com systemd[1]: httpd.service failed.
  Dec 16 16:01:37 srv.adayanneler.com polkitd[531]: Registered Authentication Agent for unix-process:6036:54850 (system bus name :1.25 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
  Dec 16 16:01:37 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  -- Subject: Unit httpd.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has begun starting up.
  Dec 16 16:01:37 srv.adayanneler.com apachectl[6052]: (20014)Internal error (specific information not available): AH00058: Error retrieving pid file logs/httpd.pid
  Dec 16 16:01:37 srv.adayanneler.com apachectl[6052]: AH00059: Remove it before continuing if it is corrupted.
  Dec 16 16:01:37 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:01:37 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  -- Subject: Unit httpd.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has failed.
  -- 
  -- The result is failed.
  Dec 16 16:01:37 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:01:37 srv.adayanneler.com systemd[1]: httpd.service failed.
  Dec 16 16:01:37 srv.adayanneler.com polkitd[531]: Unregistered Authentication Agent for unix-process:6036:54850 (system bus name :1.25, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
  Dec 16 16:01:59 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:02:03 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:02:03 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:02:38 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:02:41 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:02:41 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:02:43 srv.adayanneler.com postfix/anvil[1484]: statistics: max connection rate 2/60s for (smtp:221.182.0.210) at Dec 16 15:53:22
  Dec 16 16:02:43 srv.adayanneler.com postfix/anvil[1484]: statistics: max connection count 1 for (smtp:221.182.0.210) at Dec 16 15:52:43
  Dec 16 16:02:43 srv.adayanneler.com postfix/anvil[1484]: statistics: max cache size 1 at Dec 16 15:52:43
  Dec 16 16:03:17 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:03:20 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:03:21 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:03:57 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:04:01 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:04:01 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:04:36 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:04:39 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:04:39 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:05:18 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:05:21 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:05:21 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:05:43 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  -- Subject: Unit httpd.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has begun starting up.
  Dec 16 16:05:43 srv.adayanneler.com apachectl[6466]: (20014)Internal error (specific information not available): AH00058: Error retrieving pid file logs/httpd.pid
  Dec 16 16:05:43 srv.adayanneler.com apachectl[6466]: AH00059: Remove it before continuing if it is corrupted.
  Dec 16 16:05:43 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:05:43 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  -- Subject: Unit httpd.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has failed.
  -- 
  -- The result is failed.
  Dec 16 16:05:43 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:05:43 srv.adayanneler.com systemd[1]: httpd.service failed.
  Dec 16 16:05:58 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:06:01 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:06:01 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:06:23 srv.adayanneler.com systemd[1]: Reloading.
  Dec 16 16:06:23 srv.adayanneler.com systemd[1]: Stopping nginx - high performance web server...
  -- Subject: Unit nginx.service has begun shutting down
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit nginx.service has begun shutting down.
  Dec 16 16:06:23 srv.adayanneler.com systemd[1]: Stopped nginx - high performance web server.
  -- Subject: Unit nginx.service has finished shutting down
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit nginx.service has finished shutting down.
  Dec 16 16:06:25 srv.adayanneler.com yum[6533]: Erased: 1:nginx-1.20.2-1.el7.ngx.x86_64
  Dec 16 16:06:25 srv.adayanneler.com systemd[1]: Reloading.
  Dec 16 16:06:26 srv.adayanneler.com systemd[1]: Reloading.
  Dec 16 16:06:26 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  -- Subject: Unit httpd.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has begun starting up.
  Dec 16 16:06:26 srv.adayanneler.com apachectl[6616]: (20014)Internal error (specific information not available): AH00058: Error retrieving pid file logs/httpd.pid
  Dec 16 16:06:26 srv.adayanneler.com apachectl[6616]: AH00059: Remove it before continuing if it is corrupted.
  Dec 16 16:06:26 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:06:26 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  -- Subject: Unit httpd.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has failed.
  -- 
  -- The result is failed.
  Dec 16 16:06:26 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:06:26 srv.adayanneler.com systemd[1]: httpd.service failed.
  Dec 16 16:06:38 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:06:41 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:06:41 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:06:42 srv.adayanneler.com chronyd[538]: Selected source 116.203.151.74
  Dec 16 16:07:21 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:07:24 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:07:24 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Starting Cleanup of Temporary Directories...
  -- Subject: Unit systemd-tmpfiles-clean.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit systemd-tmpfiles-clean.service has begun starting up.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Starting Web server Apache...
  -- Subject: Unit httpd.service has begun start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has begun starting up.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Started Cleanup of Temporary Directories.
  -- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit systemd-tmpfiles-clean.service has finished starting up.
  -- 
  -- The start-up result is done.
  Dec 16 16:07:36 srv.adayanneler.com apachectl[6852]: (20014)Internal error (specific information not available): AH00058: Error retrieving pid file logs/httpd.pid
  Dec 16 16:07:36 srv.adayanneler.com apachectl[6852]: AH00059: Remove it before continuing if it is corrupted.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: httpd.service: control process exited, code=exited status=1
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Failed to start Web server Apache.
  -- Subject: Unit httpd.service has failed
  -- Defined-By: systemd
  -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
  -- 
  -- Unit httpd.service has failed.
  -- 
  -- The result is failed.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: Unit httpd.service entered failed state.
  Dec 16 16:07:36 srv.adayanneler.com systemd[1]: httpd.service failed.
  Dec 16 16:07:56 srv.adayanneler.com postfix/smtpd[1481]: connect from unknown[221.182.0.210]
  Dec 16 16:07:59 srv.adayanneler.com postfix/smtpd[1481]: warning: unknown[221.182.0.210]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
  Dec 16 16:07:59 srv.adayanneler.com postfix/smtpd[1481]: disconnect from unknown[221.182.0.210] ehlo=1 auth=0/1 quit=1 commands=2/3
  </code></pre>