You can see where
httpd is configured to look for it's configuration files using the
$ httpd -V
Server version: Apache/2.2.15 (Unix)
Server built: Feb 13 2012 22:31:42
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Server MPM: Prefork
forked: yes (variable process count)
Server compiled with....
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
You can also use the command
lsof to see what files a Unix process is accessing. My version of
httpd is using the stock port 80 so change the 80 to 8443 in your case!
$ netstat -tapn|grep ::80
tcp 0 0 :::80 :::* LISTEN 5338/httpd
You can now run
lsof to find out where the log files are getting written to:
$ lsof -p 5338|grep log
httpd 5338 root mem REG 253,0 10440 3141 /usr/lib64/httpd/modules/mod_logio.so
httpd 5338 root mem REG 253,0 27200 3139 /usr/lib64/httpd/modules/mod_log_config.so
httpd 5338 root 2w REG 253,0 2014 395029 /var/log/httpd/error_log
httpd 5338 root 7w REG 253,0 4140 394789 /var/log/httpd/access_log
You should be able to determine the location of the
access_log as well as the configuration files and look through them to determine the "Directory" and "Location" directives. These specify what local directories to use when telling Apache what files to serve.
I would then look through the
access_log to make sure that there are entries in there that correspond to accesses against the server. What I mean by this is if I browse the server at
http://www.somedom.com/somefile I should see this access recorded in the
access_log file like this:
192.168.1.110 - - [17/Jul/2013:14:39:50 -0400] "GET /somefile HTTP/1.1" 200 4303 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/5
37.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36"
Where are the files?
You can take the above knowledge that we've acquired and start to apply it like so:
These bits from
httpd -V tells us Apache's root:
So we know the main config file is here:
/etc/httpd/conf/httpd.conf. So look through that file for these lines:
$ grep -E "DocumentRoot|Directory \"|^Include" /etc/httpd/conf/httpd.conf |grep -v "^#"
So I now know that these directories are potential sources for the file we saw in the
Directories I'd look through for the file,
somefile. If it isn't in any of these locations then I'd next focus on the
Include directory mentioned above in the
These files are additional configurations that Apache uses so you'd need to repeat the steps using the
grep to look through these files as well.