|
454 | 454 | SecRule REQUEST_URI"\@streq /test2.txt""phase:1,proxy:'http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt',id:500005" |
455 | 455 | ), |
456 | 456 | match_log=> { |
457 | | -error=> [ qr/ModSecurity: Access denied using proxyto \(phase1\)/,1 ], |
| 457 | +error=> { |
| 458 | +apache=> [qr/ModSecurity: Access denied using proxyto \(phase1\)/,1], |
| 459 | +nginx=> [qr/ModSecurity: Access deniedwith code500 \(phase1\) \(Configuration Error:Proxy actionto.* requestedbut proxyisonlyavailable in Apache version\)./,1], |
| 460 | +}, |
458 | 461 | }, |
459 | 462 | match_response=> { |
460 | | -status=> qr/^200$/, |
461 | | -content=> qr/^TEST$/, |
| 463 | +status=> { |
| 464 | +apache=> qr/^200$/, |
| 465 | +nginx=> qr/^500$/, |
| 466 | +}, |
| 467 | +content=> { |
| 468 | +apache=> qr/^TEST$/, |
| 469 | +nginx=> qr/^*$/, |
| 470 | +}, |
462 | 471 | }, |
| 472 | + |
463 | 473 | request=>new HTTP::Request( |
464 | 474 | GET=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test2.txt", |
465 | 475 | ), |
|
475 | 485 | SecRule REQUEST_URI"\@streq /test2.txt""phase:2,proxy:'http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt',id:500006" |
476 | 486 | ), |
477 | 487 | match_log=> { |
478 | | -error=> [ qr/ModSecurity: Access denied using proxyto \(phase2\)/,1 ], |
| 488 | +error=> { |
| 489 | +apache=> [qr/ModSecurity: Access denied using proxyto \(phase2\)/,1], |
| 490 | +nginx=> [qr/ModSecurity: Access deniedwith code500 \(phase2\) \(Configuration Error:Proxy actionto.* requestedbut proxyisonlyavailable in Apache version\)./,1], |
| 491 | +}, |
479 | 492 | }, |
480 | 493 | match_response=> { |
481 | | -status=> qr/^200$/, |
482 | | -content=> qr/^TEST$/, |
| 494 | +status=> { |
| 495 | +apache=> qr/^200$/, |
| 496 | +nginx=> qr/^500$/, |
| 497 | +}, |
| 498 | +content=> { |
| 499 | +apache=> qr/^TEST$/, |
| 500 | +nginx=> qr/^*$/, |
| 501 | +}, |
483 | 502 | }, |
484 | 503 | request=>new HTTP::Request( |
485 | 504 | GET=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test2.txt", |
|
498 | 517 | SecRule REQUEST_URI"\@streq /test2.txt""phase:3,proxy:'http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt',id:500007" |
499 | 518 | ), |
500 | 519 | match_log=> { |
501 | | -error=> [ qr/ModSecurity: Access deniedwith code500 \(phase3\) \(Configuration Error:Proxy action requestedbut itdoesnot work in output phases\)./,1 ], |
| 520 | +error=> { |
| 521 | +apache=> [qr/ModSecurity: Access deniedwith code500 \(phase3\) \(Configuration Error:Proxy action requestedbut itdoesnot work in output phases\)./,1], |
| 522 | +nginx=> [qr/ModSecurity: Access deniedwith code500 \(phase3\) \(Configuration Error:Proxy actionto.* requestedbut proxyisonlyavailable in Apache version\)./,1], |
| 523 | +} |
502 | 524 | }, |
503 | 525 | match_response=> { |
504 | | -status=> qr/^500$/, |
| 526 | +status=> { |
| 527 | +apache=> qr/^500$/, |
| 528 | +nginx=> qr/^500$/, |
| 529 | +}, |
505 | 530 | }, |
506 | 531 | request=>new HTTP::Request( |
507 | 532 | GET=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test2.txt", |
|
520 | 545 | SecRule REQUEST_URI"\@streq /test2.txt""phase:4,proxy:'http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt',id:500008" |
521 | 546 | ), |
522 | 547 | match_log=> { |
523 | | -error=> [ qr/ModSecurity: Access deniedwith code500 \(phase4\) \(Configuration Error:Proxy action requestedbut itdoesnot work in output phases\)./,1 ], |
| 548 | +error=> { |
| 549 | +apache=> [qr/ModSecurity: Access deniedwith code500 \(phase4\) \(Configuration Error:Proxy action requestedbut itdoesnot work in output phases\)./,1], |
| 550 | +nginx=> [qr/ModSecurity: Access deniedwith code500 \(phase4\) \(Configuration Error:Proxy actionto.* requestedbut proxyisonlyavailable in Apache version\)./,1], |
| 551 | +} |
524 | 552 | }, |
525 | 553 | match_response=> { |
526 | | -status=> qr/^500$/, |
| 554 | +status=> { |
| 555 | +apache=> qr/^500$/, |
| 556 | +nginx=> qr/^500$/, |
| 557 | +}, |
527 | 558 | }, |
528 | 559 | request=>new HTTP::Request( |
529 | 560 | GET=>"http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test2.txt", |
|