docker logs<\/a><\/code> command.<\/p>\n\n\n\nYou can as well set the container to store the logs on the host using the docker run<\/code><\/strong> --volume\/-v<\/code><\/strong> option.<\/p>\n\n\n\ndocker run --name modsec3-apache -v \/var\/log\/apache2:\/var\/log\/apache2 -dp 80:80 229edcf62162<\/code><\/pre>\n\n\n\nThe logs should now be written to the \/var\/log\/apache2<\/strong><\/code> on the host.<\/p>\n\n\n\ntail -f \/var\/log\/apache2\/error.log<\/code><\/pre>\n\n\n\n\n[Thu May 06 17:55:35.007467 2021] [:notice] [pid 16:tid 139799054105664] ModSecurity: ModSecurity-Apache v0.1.1-beta configured.\nAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message\n[Thu May 06 17:55:35.066755 2021] [mpm_event:notice] [pid 16:tid 139799054105664] AH00489: Apache\/2.4.41 (Ubuntu) configured -- resuming normal operations\n[Thu May 06 17:55:35.066783 2021] [core:notice] [pid 16:tid 139799054105664] AH00094: Command line: '\/usr\/sbin\/apache2 -D FOREGROUND'\n[Thu May 06 17:55:56.640042 2021] [:error] [pid 18:tid 139798870210304] [client 172.17.0.1:60700] ModSecurity: Warning. Matched \"Operator `PmFromFile' with parameter `unix-shell.data' against variable `ARGS:doc' (Value: `\/bin\/ls' ) [file \"\/etc\/apache2\/modsecurity.d\/owasp-crs\/rules\/REQUEST-932-APPLICATION-ATTACK-RCE.conf\"] [line \"496\"] [id \"932160\"] [rev \"\"] [msg \"Remote Command Execution: Unix Shell Code Found\"] [data \"Matched Data: bin\/ls found within ARGS:doc: \/bin\/ls\"] [severity \"2\"] [ver \"OWASP_CRS\/3.2.0\"] [maturity \"0\"] [accuracy \"0\"] [tag \"application-multi\"] [tag \"language-shell\"] [tag \"platform-unix\"] [tag \"attack-rce\"] [tag \"paranoia-level\/1\"] [tag \"OWASP_CRS\"] [tag \"OWASP_CRS\/WEB_ATTACK\/COMMAND_INJECTION\"] [tag \"WASCTC\/WASC-31\"] [tag \"OWASP_TOP_10\/A1\"] [tag \"PCI\/6.5.2\"] [hostname \"172.17.0.2\"] [uri \"\/\"] [unique_id \"162032375634.996239\"] [ref \"o1,6v10,7t:urlDecodeUni,t:cmdLine,t:normalizePath,t:lowercase\"]\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"Welcome to our guide on how to install ModSecurity 3 with Apache in a Docker container. Libmodsecurity (Modsecurity v3), is an open source, cross platform web<\/p>\n","protected":false},"author":1,"featured_media":8792,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[34,121,1207],"tags":[3496,3497,3494,1141,3495,3498],"class_list":["post-8781","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-howtos","category-modsecurity","tag-apache-with-modsecurity-docker-container","tag-install-modsecurity-3-in-a-docker-container","tag-install-modsecurity-3-with-apache-in-a-docker-container","tag-modsecurity-3","tag-modsecurity-docker-container","tag-run-modsecurity-3-in-a-docker-container","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8781"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=8781"}],"version-history":[{"count":13,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8781\/revisions"}],"predecessor-version":[{"id":21824,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8781\/revisions\/21824"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/8792"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=8781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=8781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=8781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}