Assuming your Apache server is running and you have shell access:
do the following:
genja ~ # ps aux |grep apache|tail -n1 root 23605 0.0 0.2 248636 10684 ? Ss Jun08 0:06 /usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D LANGUAGE -D MANUAL -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D PERL -D PROXY -D SCGI -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf -k start
.. This is the daemon apache process. You are looking for "-f / etc / apache2 / http.conf". If your apache server was not told (according to distro init scripts) where to get the configuration file, it will look in the default location, which can be located under: / etc / apache2 / or /etc./httpd/ (or somewhere else, indeed, but these two are the most common). In this folder you will find a file called apache2.conf or httpd.conf
just try the following:
find /etc/ -iname httpd.conf -o -iname apache2.conf
Once you have installed the configuration file for the apache server, find the line where they include the module configurations. On my system, it looks like this:
Include /etc/apache2/modules.d/*.conf
Now you need to find out where the log file is:
genja modules.d
which you are looking for: CustomLog / var / log / apache2 / access_log common.
Please note that this CustomLog directive may also be located in the main apache2.conf file.
You now have the location of the log file. Most likely, stopping your server from logging in now is file permissions. Make sure that the directory specified in the CustomLog section exists and that the Apache server can write to it:
as root:
mkdir -p /var/log/apache2 touch /var/log/apache2/access_log chown -R APACHEUSER /var/log/apache2 chmod 755 /var/log/apache2 chmod 644 /var/apache2/access_log
where APACHEUSER will most likely be apache or www or even httpd. You can understand this by doing:
genja ~ # ps aux |grep apache |awk '{print $1}' apache (...) apache root
So the user running the apache server on my system is actually called apache. This is not the root. Or at least it should not be.
restart your server after changing the resolution of this file. I do not know how your distribution does it. I think ubuntu has a [s] command. But you can always run the init script directly:
/etc/init.d/apache restart (ir may be located elsewhere on your distribution) just restart the entire computer if you do not know how to restart the Apache server.
If the access_log file is empty after restarting the server, replace APACHEUSER with root in the command above.
after that, just use your favorite pager or text editor to view the magazine. Or even the -f tail to control it in real time. Hope this helps. globigerin