Article directory
A digital marketer installed CWP7 Control Panel Apache 2.4.25 on a Linux server , but the Apache service failed to start, resulting in the following error: ▼
httpd.service - Web server Apache Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Wed 2022-04-13 05:21:29 EST; 4min 53s ago Process: 12087 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE) Apr 13 05:21:29 www.etufo.org systemd[1]: Starting Web server Apache... Apr 13 05:21:29 www.etufo.org apachectl[12087]: AH00526: Syntax error on line 12 of /usr/local/apache/conf/sharedip.conf: Apr 13 05:21:29 www.etufo.org apachectl[12087]: Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration Apr 13 05:21:29 www.etufo.org systemd[1]: httpd.service: control process exited, code=exited status=1 Apr 13 05:21:29 www.etufo.org systemd[1]: Failed to start Web server Apache. Apr 13 05:21:29 www.etufo.org systemd[1]: Unit httpd.service entered failed state. Apr 13 05:21:29 www.etufo.org systemd[1]: httpd.service failed.
How to uninstall and reinstall when Apache2 reports an error?

Therefore, the Apache service was uninstalled and removed on CentOS 7.
Enter the following CWP uninstall remove Apache service command ▼
yum remove cwp-httpd
Apache service yum command to delete and reinstall
Step 1: Install Apache service using the yum command.
After uninstalling CWP and deleting the Apache service, use the yum command to reinstall the Apache service▼
yum install cwp-httpd
Step 2: Activate Apache, which requires starting the Apache service.
Enter the following command in SSH▼
systemctl start httpd
Step 3: Next, configure the Apache service to start when the system boots:
systemctl enable httpd
Step 4: Check the Apache service status
Display information about Apache and view the status of the currently running Apache service:
systemctl status httpd
Hopefully, the article "How to Uninstall and Reinstall Apache2 When Errors? Deleting and Reinstalling Apache Service Using the yum Command" shared on Chen Weiliang's blog ( https://www.chenweiliang.com/ ) will be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-27525.html
