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
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop







![Apache: [warn] _default_ VirtualHost overlap on port 80, the first has precedence Error and Solution](http://s13.cyberciti.org/images/shared/rp/3/28.jpg)







{ 13 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
hello there,
can someone help me out with how i can stop my apache from running.?
run
# service httpd restart
…is better!