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 Answers
Use apachectl -S
to determine which virtual hosts (and their location in files) are in your configuration.
-
I guess I'm not explaining myself well enough. I'm looking for the hosts file, not the .conf files.– symlynkFeb 3, 2013 at 7:06
-
That doesn't really have anything to do with the virtual hosts.
/etc/hosts
..? Feb 3, 2013 at 7:10 -
nevermind, I think I found it
/private/etc/hosts
. I had a hosts file manager that was confusing things.– symlynkFeb 3, 2013 at 7:16 -
Hosts file manager? That certainly could confuse things. Why not use DNS instead? Feb 3, 2013 at 7:18
-
It was an old setup that a friend at work setup for me. Not sure why he chose it.– symlynkFeb 3, 2013 at 7:21
ps aux | grep catalina
Should show the conf files which are being used by the currently running catalina instance.
-
Is that just for apache Tomcat? I tried the command and didn't get back any info about my hosts file.– symlynkFeb 3, 2013 at 7:01
-