Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> When I first turned this on, I set the directive in the configuration file to “Conneption: Keep Alive.” Apache began laughing hysterically at my typing skills, and promptly crashed

So a syntax error is now a "crash?". Web developers...



Today I learned people reboot apache without doing `apachectl -t` first.


apachectl -t?

Why go ghetto? You should be doing something like "/sbin/service httpd restart".


Lots of production installations don't use distro-supplied binaries for their critical services (and there are lots of good reasons for doing this). They generally won't work with (or have) the distro-supplied initscripts.

Note that systemd makes it a lot cleaner and simpler to supply your own service definitions, so eventually your intuition will probably be right, and systemctl will be the proper interface to everything.


> You should be doing something like "/sbin/service httpd restart".

The 'service' equivalent is: service httpd configtest

> Why go ghetto?

What does 'going ghetto' mean exactly?


>The 'service' equivalent is: service httpd configtest

Yep, typo-ed it.

>What does 'going ghetto' mean exactly?

The slang meaning of the term in this case: a low level, jury rigged solution.


`apachectl -t` checks the .conf files for syntax errors.

For this reason, there's zero excuse for ever having an Apache install crash from a typo.


The Apache config test does not catch every error and you can still cause crashes if you don't check it over by hand.


We have Apache running on some Windows boxes-- haven't found a way to run apachectl on Windows...



Oops, sorry, meant:

  service httpd configtest
I.e run the proper init script (which might also do other checks), not just test the apache config, as you wouldn't also just start apache with apachectl.

Even if you have your own version of apache compiled, you should still provide your own init script, and write in in the standard service way.


I believe he was testing the config, not restarting the server.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: