Every time you make config changes to Apache, you have to restart the server. If you’re suffering the death of a thousand clicks trying to use a GUI to do this simple task, here’s a tip that’ll get it done quick and easy.

If you’
re like me (read: not a seasoned sysadmin) you’

ve probably taken the GUI root to restarting Apache. Whether weaving through the RedHat Control Panel or by simply closing your Windows DOS window, you may have thought “There’
s got to be a better way!”

Well, there is.

Restarting Apache Under Linux

OK, here are the magic one-liners for your hungry command line:

Restart:


/etc/rc.d/init.d/httpd restart

Start:


httpd

(See the Apache Documentation for all the command line flags.)

Stop:


kill -TERM `cat /usr/local/apache/logs/httpd.pid`

(See the Apache Documentation for more options.)

Restarting Apache Under Windows

Well if you insist upon using a non-open OS with this open sever, OK. I’

ll assume you’
re running Apache under NT, and that you’
ve set it up as a service. Instead of futzing with the Services window, these one-liners can save you time by entering them in the RUN menu or from a DOS prompt.

Start:


NET START APACHE

Stop:


NET STOP APACHE

If you need to set up Apache as a service under NT, check out the Apache Windows Documentation. If you’

re running Windows 95/98, you can restart or stop it by opening up a DOS window and issuing the following commands.

Restart:


apache -k restart

Stop:


apache -k shutdown

More information on Windows commands and configs are available in Apache’
s Windows Documentation
.

Facebook Comments

More Stuff

Emblematic Group and Mozilla Team Up to Showcase Next Generation o... Everything you share on the internet is a story. You read blog posts and watch videos that make you feel connected to people across the world. Virtual...
Latest Firefox Release is Faster than Ever With the introduction of the new Firefox Quantum browser in 2017 we changed the look, feel, and performance of our core product. Since then we have la...
Competing without a Marketing Budget: When All You Have is a Produ... This is a story about the power of a good landing page, PR efforts, and marketing strategy. The refreshing twist here is that instead of explaining ho...
The Ongoing Fiasco and Mysterious Afterlife of QuadrigaCX I’d say you were a little late to the cryptocurrency party if you haven’t heard about the ongoing catastrophe that’s been QuadrigaCX these past six ...
Spread the love

Posted by News Monkey