How do I restart Apache 2 Web Server under Debian / Ubuntu Linux or UNIX operating systems?
Apache is primarily used to serve both static content and dynamic Web pages on the World Wide Web. Many web applications are designed expecting the environment and features that Apache provides.
First, login to server using ssh, if server is not in local data center:
ssh root@your.server.com
Once logged in type the following commands
Restart Apache 2 web server, enter:
# /etc/init.d/apache2 restart
If you are using Ubuntu use sudo:
$ sudo /etc/init.d/apache2 restart
To stop Apache 2 web server, enter:
# /etc/init.d/apache2 stop
OR
$ sudo /etc/init.d/apache2 stop
To start Apache 2 web server, enter:
# /etc/init.d/apache2 start
OR
$ sudo /etc/init.d/apache2 start
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -




{ 10 comments… read them below or add one }
or try this: invoke-rc.d apache2 restart
reset apache.404 not found
Sorry, this doesn’t work on Red Hat:
/etc/init.d/apache2: command not found
For Redhat use:
If you want to stop,start, restart apache2 in Debian give this a try after su’ing
/etc/init.d/apache2ctl stop
or start restart what ever
Sorry, this doesn’t work on Debian:
/etc/init.d/apache2: command not found
remove the leading $ sign
service httpd start|stop|restart|status
okey what is mean when this message coming to u : No apache MPM package installed
sudo service apache2 restart