1

I'm trying to set up apache virtual hosts on my local machine. Since my file system is kind of a mess, I have several hosts files hanging around. Is there a way to determine which hosts file my apache installation is using?

2

Use apachectl -S to determine which virtual hosts (and their location in files) are in your configuration.

5
  • I guess I'm not explaining myself well enough. I'm looking for the hosts file, not the .conf files.
    – symlynk
    Feb 3 '13 at 7:06
  • That doesn't really have anything to do with the virtual hosts. /etc/hosts..? Feb 3 '13 at 7:10
  • nevermind, I think I found it /private/etc/hosts. I had a hosts file manager that was confusing things.
    – symlynk
    Feb 3 '13 at 7:16
  • Hosts file manager? That certainly could confuse things. Why not use DNS instead? Feb 3 '13 at 7:18
  • It was an old setup that a friend at work setup for me. Not sure why he chose it.
    – symlynk
    Feb 3 '13 at 7:21
-2
ps aux | grep catalina

Should show the conf files which are being used by the currently running catalina instance.

2
  • Is that just for apache Tomcat? I tried the command and didn't get back any info about my hosts file.
    – symlynk
    Feb 3 '13 at 7:01
  • I am afraid its only for tomcat. Feb 3 '13 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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