Start / Stop / Restart Apache Web Server Via SSH or root
Start / Stop / Restart Apache Web Server Via SSH or root
problems with your server apache..
follow first this script...
follow first this script...
Once logged in switch to the root user by typing su - and entering the root password, when prompted:
ubuntu users type sudo -i
$ su -
To restart Apache 2 web server over the ssh, enter:
# /etc/init.d/apache2 restart
To stop Apache 2, enter:
# /etc/init.d/apache2 stop
To start Apache 2, enter:
# /etc/init.d/apache2 start
If you are using RHEL / CentOS / Fedora based server, enter:
# service httpd restart
To stop RHEL / CentOS / Fedora based Apache server, enter:
# service httpd stop
To start RHEL / CentOS / Fedora based Apache server, enter:
# service httpd start
A Note About apachectl Command
You can also use the apachectl command as follows to restart the apache server:
# apachectl -k restart
Re: Start / Stop / Restart Apache Web Server Via SSH or root
Ehm... what's it it? FAQ or problem? ;-)
If FAQ, then will be helpfull teach use sudo than command... fro
If FAQ, then will be helpfull teach use sudo than command... fro
Code: Select all
sudo service apache2 status