Skip to main content

Hosting images from specific domain on jboss

When it is supposed to host static contents from the same jboss server and additionally host them from multiple domains, new <Host> sections should be defined in the server.xml file. Server.xml file is at /<jboss-home>/deploy/jboss-web.deployer folder in the 4.2 version.


<Host name="virtualhost1" autoDeploy="false" deployOnStartup="false" deployXML="false" configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">
 <Alias>virtualhost1.testdomain.com</Alias>
 <Context path="/images1"  docBase="/image_folder1"  debug="0" reloadable="true"/>
</Host>

<Host name="virtualhost2" autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">
 <Alias>virtualhost2.testdomain.com</Alias>
 <Context path="/images2"  docBase="/image_folder2"  debug="0" reloadable="true"/>
</Host>

Comments

Popular posts from this blog

Sending Jboss Server Logs to Logstash Using Filebeat with Multiline Support

In addition to sending system logs to logstash, it is possible to add a prospector section to the filebeat.yml for jboss server logs. Sometimes jboss server.log has single events made up from several lines of messages. In such cases Filebeat should be configured for a multiline prospector.
Filebeat takes lines do not start with a date pattern (look at pattern in the multiline section "^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}" and negate section is set to true) and combines them with the previous line that starts with a date pattern.

server.log file excerpt where DatePattern: yyyy-MM-dd-HH and ConversionPattern: %d %-5p [%c] %m%n
Logstash filter: