Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Why RESTORE at all? Stop editing it!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Why RESTORE at all? Stop editing it!
Authored by: ScooterComputer on Feb 19, '03 11:22:26AM

Once again, I'll submit this as a workaround to all of these httpd.conf issues:

Why is anyone modifying httpd.conf to begin with? Having examined the httpd.conf file that Apple installs, I can't find anything that can't relatively easily be overridden through the use of an override file placed in the /private/etc/httpd/users directory. Apple, thankfully, placed an Include statement as the last line of the httpd.conf file that loads all files in the ./users directory; simply create a new file full of any overrides (or multiple files, for better organization) called 1stoverrides.conf in that directory.

This works, as Apache's config loading algorithm uses the LAST statement found, so any override statement will OVERRIDE what is entered into httpd.conf.



[ Reply to This | # ]
Use BBEdit to find the differences!
Authored by: projazz on Feb 19, '03 02:52:01PM

Longtime users of BBEdit already know of the "Find Differences..." (between files) under the Search menu item. (I have not tried Filemerge). Worked well for me. YMMV

---
Thanks,
Projazz



[ Reply to This | # ]
Before there was BBEdit, there was diff
Authored by: XSage on Feb 23, '03 09:57:51AM
The command /usr/bin/diff is the classic unix command line program for finding differences. One could use BBEdit, but for those without it everyone has diff.

For more about it, check out:
man diff

...at the terminal.

[ Reply to This | # ]

Why RESTORE at all? Stop editing it!
Authored by: mithras on Feb 19, '03 04:35:00PM

Your advice is sound, but I don't think it applies to the loading/adding of Apache modules. Very often the loading is order dependent, so a directive placed in an later included file is not likely to work well.

Moreover, if you want to DISable a module that is loaded, I don't think you can do so, except by modifying the original httpd.conf (or using the apxs tool to do so).

---
--
<a href="http://mithras.homeunix.net/downloads">my free OS X applications and scripts</a>



[ Reply to This | # ]
Why RESTORE at all? Stop editing it!
Authored by: ScooterComputer on Feb 19, '03 11:39:30PM
I am currently loading and adding modules in my 1stoverrides.conf file (dav and ssl) with no problems. Yes, you can't UNLOAD a module, but by using ClearModuleList you might be able to rejigger your AddModule execution in an overrides file...try it and see. Plus, most current modules aren't as susceptible to ordering problems as old ones were.

My intention for recommending the 1stoverrides.conf file and not editing the httpd.conf comes from the fact that MOST of the complaints I have seen regarding OS X updates stomping on httpd.conf files are coming from ppl who aren't doing rocket science in the httpd.conf...and in their very general cases (where they probably aren't doing brain surgery with LoadModule/AddModule) then my Hint stands.

For those who ARE doing proper brain surgery in there, you a) know FOR A FACT (because you've tried it) that an Include override won't work, and b) don't go installing updates willy-nilly without backing up your configs and rechecking them after completing the update.

[ Reply to This | # ]