Apache can be restarted on Linux or Unix systems using the following methods.
Log into your web server using the SSH client.
After logging in, enter the following command to restart Apache2.
For Debian / Ubuntu system:
restart sudo service apache2
For CentOS / RHEL (Red Hat)
Service httpd restart