A
A
Andrey Andryushchenko2017-10-02 16:00:56
Apache HTTP Server
Andrey Andryushchenko, 2017-10-02 16:00:56

How to get a dump of http traffic on the server?

There is a site on the apache-server. It is necessary to collect logs of http requests coming to the server. Interested in all request headers, url, method, queryString, it is also desirable to get the same for the response.
I have three options for solving this problem, but all of them are not suitable for one reason or another:
1) Use your own LogFormat, perhaps the most logical way. But you can’t set it to display all headers, only manually set the field for absolutely everyone, but this is terribly inconvenient, because there will be a lot of empty ones, and besides, there are different non-standard types of headers that I don’t know how to predict
2) Use mod_log_forensic, it makes the log almost the same as it should, but firstly, I also want to receive replies (although this is not critical), and secondly, there is no queryString in POST requests, this is already critical
3) Use ModSecurity and AuditLog, but I was asked not to install ModSecurity on the server, so that doesn't work either.
Any other options?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Andryushchenko, 2017-10-02
@delphikettle

Connected the mod_dumpio module , it allows you to dump all traffic

M
Mysterion, 2017-10-02
@Mysterion

You can put nginx in front of apache and save all the logs with it. Both get and post and all other requests will save their content as well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question