forked from ISTI-ansible-roles/ansible-roles
library/roles/tomcat-multiple-instances/templates/tomcat-server.xml.j2, library/roles/tomcat/templates/tomcat-server.xml.j2: Support the x-forwarded-for header in the access_log configuration.
This commit is contained in:
parent
0065b6a1b0
commit
3c615980ef
|
@ -94,12 +94,15 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
{% if item.access_log_enabled %}
|
{% if item.access_log_enabled %}
|
||||||
|
<!-- Automatically substitutes the IP with the one contained
|
||||||
|
in the x-forwarded-for header if that header is set -->
|
||||||
|
<Valve className="org.apache.catalina.valves.RemoteIpValve" />
|
||||||
<!-- Access log processes all example.
|
<!-- Access log processes all example.
|
||||||
Documentation at: /docs/config/valve.html
|
Documentation at: /docs/config/valve.html
|
||||||
Note: The pattern used is equivalent to using pattern="common" -->
|
Note: The pattern used is equivalent to using pattern="combined" -->
|
||||||
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||||
prefix="localhost_access." suffix="log"
|
prefix="localhost_access." suffix="log"
|
||||||
pattern="%h %l %u %t "%r" %s %b"
|
pattern="combined"
|
||||||
rotatable="False"
|
rotatable="False"
|
||||||
/>
|
/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -139,12 +139,15 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{% if tomcat_access_log_enabled %}
|
{% if tomcat_access_log_enabled %}
|
||||||
|
<!-- Automatically substitutes the IP with the one contained
|
||||||
|
in the x-forwarded-for header if that header is set -->
|
||||||
|
<Valve className="org.apache.catalina.valves.RemoteIpValve" />
|
||||||
<!-- Access log processes all example.
|
<!-- Access log processes all example.
|
||||||
Documentation at: /docs/config/valve.html
|
Documentation at: /docs/config/valve.html
|
||||||
Note: The pattern used is equivalent to using pattern="common" -->
|
Note: The pattern used is equivalent to using pattern="combined" -->
|
||||||
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||||
prefix="localhost_access." suffix="log"
|
prefix="localhost_access." suffix="log"
|
||||||
pattern="%h %l %u %t "%r" %s %b"
|
pattern="combined"
|
||||||
rotatable="False"
|
rotatable="False"
|
||||||
/>
|
/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue