Skip to content

Comment on How to make a site really freaking fastparent

Comments

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.