Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom access_log apache httpd

Discussion in 'EasyApache' started by ambot, Nov 19, 2016.

  1. ambot

    ambot Registered

    Joined:
    Jul 20, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    151
    hello,

    how do i force cpanel/whm to log all requests of http? I tried accessing one of my virtual hosts domains and cannot see my own logs (ip, file requested etc).

    tail -f /usr/local/apache/logs/access_log

    example of output of the logs

    127.0.0.1 - - [19/Nov/2016:08:26:25 -0500] "GET / HTTP/1.0" 200 111
    127.0.0.1 - - [19/Nov/2016:08:26:25 -0500] "GET / HTTP/1.0" 200 111
    163.172.64.225 - - [19/Nov/2016:08:27:02 -0500] "GET /products/query/gold%20bracelets/ HTTP/1.1" 404 10115
    163.172.64.225 - - [19/Nov/2016:08:27:02 -0500] "GET /products/query/gold%20bracelets/ HTTP/1.1" 404 10115
    163.172.65.64 - - [19/Nov/2016:08:27:29 -0500] "GET /cat/health-and-beauty/page/21/?order=asc&orderby=hits&orderby=expires&order=desc HTTP/1.1" 404 10235
    163.172.65.64 - - [19/Nov/2016:08:27:29 -0500] "GET /cat/health-and-beauty/page/21/?order=asc&orderby=hits&orderby=expires&order=desc HTTP/1.1" 404 10235

    I would like also to include the virtual host user in the logs. How do i implement this? I am using DSO as my php handler.

    Any help is highly appreciated.


    fgwapo
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I believe the Apache domlogs for your domain names are the logs you are looking for. If you're using EasyApache 4, the path is:

    /var/log/apache2/domlogs/$domain.tld

    Otherwise, on EasyApache 3, the path is:

    /usr/local/apache/domlogs/$domain.tld

    Thank you.
     
Loading...

Share This Page