Votes: 0Posted On: Nov 26, 2017 11:42:26
Yes, you can restart the Apache server with the help of an ssh command. If you want to go for the graphical option, you can also restart it with the help of your cPanel account.
Restarting through SSH
The Apache server can be restarted with the help of the command line by using the following command.
sudo service apache2 restart (For Ubuntu based Operating System)
service httpd restart (For CentOS based operating system)
(Note: Here we are restarting Apache2 server.)
But since you want to restart the Apache server by connecting to the server remotely, we will have to use the SSH command.
ssh user@IP_Address sudo service apache2 restart (For Ubuntu based Operating System)
ssh user@IP_Address service httpd restart (For CentOS based operating system)
Restarting Apache through your Cpanel Account
As you have a cPanel account, you can restart your Apache server very easily using the friendly Graphical User Interface.
Log into your Cpanel account with the following URL opened in a browser.
https:// yourserverip:2087 or https://yourhostname:2087 (where 'yourserverip' / 'yourhostname' is actually your server name/creds)
Please login as root and your password.
At the home screen, you will find various buttons. One of them would be "Restart Services" button. Click on the "Restart Services" button.
Under the "Restart Services" option, a list of services will be displayed. To restart the Apache server, click on "HTTP server(Apache)" button to restart the Apache server. You will be asked for confirmation. Click on YES to confirm.