The Apache web server is a software program that allows a computer to host websites. It receives requests from web browsers like Chrome or Firefox and sends back the website’s content so that users can view web pages. Apache is widely used worldwide for hosting websites, including personal blogs, e-commerce websites, and corporate websites.
When you make changes to the Apache web server configuration, such as adjusting settings or adding new features, you need to restart Apcahe service for the changes to take effect. Restarting the service will refresh the server and ensures the use of updated configuration and settings. It’s similar to turning it off and on to apply the changes.
Steps to restart Apache service:
- Log into the WHM Panel as root user.
- Use the search box on the upper left side of the screen and search for Restart Service.
- Click the HTTP Server (Apache) option.
- In the new page, it will ask for confirmation. If you want to proceed, click the Yes button to restart the Apache service.
- Once the restart process is complete, you will receive a success message indicating that Apache restarted successfully.
What is a Graceful Apache Restart?
Apache Graceful Restart reloads the Apache Configuration(httpd. conf) without restarting the Web Server. When we do the Graceful Restart, it only reloads the Configuration file and does not restart the Apache Web Server. Graceful Restart will not abort the currently open connection to the server. This command is convenient when you have updated the Apache configuration and don’t want users to lose connection to the server.
To restart the Apache gracefully, run the below command in Terminal Window or by SSH as root.
apachectl -k graceful or apachectl graceful
That’s It! Restart Apache service is done.