In order to enable access logs in JBOSS 7.2.1,Please refer below steps:
- Go to JBOSS_HOME/standalone/configuration folder.
- Open Standalone.xml and put following snippet under <subsystem xmlns="urn:jboss:domain:web:1.4">
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" instance-id="${jboss.instance-id.jvmRoute}" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" max-connections="250"/>
<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp" max-connections="250"/>
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
<ssl name="https" password="g04theau" certificate-key-file="/opt/jboss/certs/wildcard.prod.ch3.s.com.jks"/>
</connector>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
<access-log pattern='%h	%p	%l	%u	%t	"%r"	%s	%b	"%{Referer}i"	"%{User-Agent}i"	%D	"%{X-Forwarded-For}i"	"%{True-Clien
t-IP}i"	"%{JSESSIONID}c"' prefix="access-log-" rotate="true">
<directory path="." relative-to="jboss.server.log.dir"/>
</access-log>
</virtual-server>
</subsystem>
For access log pattern configuration, refer Access log Patterns
Enjoy Learning.
No comments:
Post a Comment