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

Find and replace with sed command in Linux

Find and replace feature is always handy. It can turn into a torture when it comes to change or delete a simple constant string in a text file. There is a handy tool in linux for doing these kind of tihngs. Actually sed is not a text editor but it is used outside of the text file to make changes.