Psychz - Sachin
Votes: 0Posted On: Nov 26, 2017 23: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.
For Ubuntu based Operating System
sudo service apache2 restart
For CentOS based operating system
service httpd restart
(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.
For Ubuntu based Operating System
ssh user@IP_Address sudo service apache2 restart
For CentOS based operating system
ssh user@IP_Address service httpd restart
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.
Step 1
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.
Step 2
At the home screen, you will find various buttons. One of them would be "Restart Services" button. Click on the "Restart Services" button.
Step 3
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.