restart linux web server using ssh
Solution 1
You have powered off the machine, you can't restart it from SSH. unless it supports Wake from Lan.
If you want to only restart your web server use
apachectl restart
Solution 2
reboot
or if you want to restart just apache then
/etc/init.d/apache2 restart
and if you want to shutdown then instead of shutdown -h now
you can simply use poweroff
Solution 3
You have shut down your server. Unless server supports wake from lan
option, you can no longer turn it on remotely.
To restart server, use reboot
command through ssh.
Solution 4
Sorry I can't advise how to remotely turn on the server. But if you are asking how to reboot it next time, use "shutdown -r now"
Muhammad Umar
Updated on October 23, 2020Comments
-
Muhammad Umar over 3 years
I have shut down my linux web server using ssh command
~# shutdown -h now
how can i restart the server again. i am trying out different things but they are not helping. How to restart using ssh.
-
Gherman over 5 yearsHow do you know it's Apache and not Nginx or something else?