Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache customLog (get part of the URL) |
|
Author |
|
tiquee
Joined: 05 Sep 2018 Posts: 1 Location: Brazil, Curitiba
|
Posted: Wed 05 Sep '18 21:26 Post subject: Apache customLog (get part of the URL) |
|
|
hi,
I have a customLog (httpd.conf) at my apache 2.4 on a OpenSuse Linux and I'm using the %U to get the URL path requested, not including any query string, but I'd like to get only the first 5 parts of the url.
Example: /part1/part2/part3/part4/part5/part6 should generate the log only until .../part5
Is it possible to do this? I thought about using some regular expression, but I did not find where and how to apply.
Below is my current custom log
Code: | CustomLog "%{%Y/%m/%d %T}t,%{consumerId}i,%m,%>s,%U,%D" |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|