mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 17:41:52 +03:00
nginx refactoring
Refactoring on the nginx module, including: - Better handling larger posts; - Now using nginx echo module during the regression tests. - Better interacting with neginx chain rules - Separation of the request handling and content filters. - Better handling nginx sessions and resource counts to allow a more efficient garbage collector. - Handling both http/1.0 and 1.1, including keep-alive. - Tests are now capable to test nginx as a proxy or end-server. - Tested agains nginx 1.6 and 1.7.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
|
||||
user root;
|
||||
worker_processes 1;
|
||||
worker_processes 1;
|
||||
daemon on;
|
||||
error_log logs/error.log debug;
|
||||
worker_rlimit_core 500M;
|
||||
working_directory /tmp/;
|
||||
error_log logs/error.log debug;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
@@ -10,13 +12,42 @@ events {
|
||||
http {
|
||||
ModSecurityEnabled [% enable %];
|
||||
ModSecurityConfig [% config %];
|
||||
server {
|
||||
client_body_buffer_size 1024M;
|
||||
|
||||
server {
|
||||
client_max_body_size 30M;
|
||||
listen [% listen %];
|
||||
server_name localhost;
|
||||
location / {
|
||||
error_page 405 = $uri;
|
||||
|
||||
|
||||
|
||||
location /no-proxy/test.txt {
|
||||
echo "TEST";
|
||||
}
|
||||
|
||||
location /no-proxy/test2.txt {
|
||||
echo "TEST 2";
|
||||
}
|
||||
|
||||
location /proxy/test.txt {
|
||||
proxy_pass http://localhost:[% listen %]/more/test.txt;
|
||||
}
|
||||
|
||||
location /proxy/test2.txt {
|
||||
proxy_pass http://localhost:[% listen %]/more/test2.txt;
|
||||
}
|
||||
|
||||
location /test.txt {
|
||||
echo "TEST";
|
||||
}
|
||||
|
||||
location /test2.txt {
|
||||
echo "TEST 2";
|
||||
}
|
||||
|
||||
location / {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user