forked from danghvu/mod_dumpost
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
mod_dumpost | ||
=========== | ||
|
||
Small apache module to log body content of request (POST / FORM data). Data are written to error log. For example: | ||
Small apache module to log body content of request (POST / FORM data). Data are written to error log by default. For example: | ||
``` | ||
[Sat Dec 08 09:58:24 2012] [info] [client 1.1.2.2] ------------------------------4bc4ed022729\r\nContent-Disposition: form-data; name="f"; filename="poc.html"\r\nContent-Type: text/html\r\n\r\n | ||
[Sat Dec 08 09:58:43 2012] [info] [client 1.1.1.1] a=100 | ||
``` | ||
|
||
Note: You can do the same with mod_security, use this when you want a quick and lightweight solution. | ||
Note: You can do the same with mod_security, use this when you want a quick and lightweight solution. | ||
|
||
###Installation: | ||
``` | ||
make | ||
make install | ||
``` | ||
|
||
###Configuration: | ||
In `httpd.conf` (optional): | ||
`DumpPostMaxSize 1024`: limit the size of a log entry to `1024` bytes (default value: `1048576` i.e. 1MB) | ||
`DumpPostHeaderAdd Cookie Content-Type`: add HTTP Header to log together with POST (default value: None) | ||
In `httpd.conf` (optional): | ||
* `DumpPostMaxSize 1024`: limit the size of a log entry to `1024` bytes (default value: `1048576` i.e. 1MB) | ||
* `DumpPostHeaderAdd Cookie Content-Type`: add HTTP Header to log together with POST (default value: None) | ||
* `DumpPostLogFile`: specify a custom file to write the log entry (other than | ||
error log) | ||
|
||
###Requirement: | ||
* apxs2 : | ||
* Ubuntu: `sudo apt-get install apache2-threaded-dev` | ||
* Others: install apxs, then `alias apxs2=apxs` | ||
* `LogLevel` of at least `Info` | ||
* apxs: | ||
* Ubuntu: `sudo apt-get install apache2-threaded-dev`, edit Makefile change | ||
`apxs` to `apxs2` | ||
* `LogLevel` of at least `Info` (not important if using DumpPostLogFile) |