Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I messed up my Apache config file, httpd.conf.


I followed this article, http://emresaglam.com/blog/1035, to try and find the original httpd.conf inside Install OS X Mountain Lion.app.

The article says that the Bom files ("Bill of Materials"), "describes what is in this pkg file and where they will be written to."

Install OS X Mountain Lion.app -> Contents\SharedSupport\InstallESD.dmg -> Packages\***.pkg -> Bom

However, the Bom files don't seem to be a complete listing. I extracted the contents of the Payload for Essentials.pkg and there was more to it then listed in its Bom.


Is there a better way to navigate and find the file I need from the installer, besides extracting the contents of each pkg file's Payload? Any tips or resources would be greatly appreciated!

Thanks!

share|improve this question
1  
I think maybe you are not findind the file because it is not in the distribution. I suspect that some other program builds it when needed. As evidence, I offer the fact that pkgutil --files com.apple.pkg.Essentials | grep httpd.conf does not print anything. –  Harald Hanche-Olsen Dec 13 '12 at 17:39
    
@harald-hanche-olsen Thank you! I'm so stupid for not looking to see what else pkgutil does. I found httpd.conf in BSD.pkg using pkgutil --payload-files ... | grep httpd.conf. If you post your comment as an answer, I'll mark it as answered, thanks! Also, I'm curious where I can find the file you refer to in your comment, com.apple.pkg.Essentials. –  flackend Dec 13 '12 at 18:49
    
I posted a somewhat different answer, as I discovered more information. Sometimes, it seems that computers are designed to make us feel stupid … –  Harald Hanche-Olsen Dec 13 '12 at 20:20
add comment

1 Answer 1

up vote 2 down vote accepted

When I first commented on your question, I was hindered by not having discovered httpd.conf on my own system. Now I have found it, however, and I can find out what packages owns it as follows:

; pkgutil --file-info /private/etc/apache2/httpd.conf
volume: /
path: /private/etc/apache2/httpd.conf

pkgid: com.apple.pkg.BSD
pkg-version: 10.8.0.1.1.1306847324
install-time: 1352382423
uid: 0
gid: 0
mode: 644

Note: com.apple.pkg.BSD is a package name, not a filename. You can find a list of all packages that pkgutil knows about by running

pkgutil --packages

Also note that running the above command on /etc/apache2/httpd.conf does not yield a useful result, because /etc is a symbolic link to /private/etc.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.