To make Elvis DAM Server run from a "subdir", set the following option to config.properties.txt:
serverPath=/elvis
Note: DO NOT set the path directly in the jetty.xml file, it inherits settings from config.properties.txt. The serverPath MUST be set in the config.properties.txt, otherwise you may have trouble with processing servers connecting to your main Elvis server.
To add handling for files in the root of the server, add a handler in the jetty.xml file. There is no need to run Elvis behind another web server. Find the following piece in the jetty.xml config:
<Set name="handler">
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
...
</Array>
</Set>
</New>
</Set>
Add the following jetty handler to the code above, make sure it is at the bottom of the handler list:
<Set name="handler">
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
...
<Item>
<New class="org.mortbay.jetty.handler.ContextHandler">
<Set name="contextPath">/</Set>
<Set name="resourceBase">C:\htdocs\fake_root</Set>
<Call name="addHandler">
<Arg>
<New class="org.mortbay.jetty.handler.ResourceHandler"/>
</Arg>
</Call>
</New>
</Item>
</Array>
</Set>
</New>
</Set>
This handler will serve all content from C:\htdocs\fake_root. You can put an index.html file in that folder to show your "Hey there, nothing to see here, move along!" page.
References
For more information about Jetty handlers, see Eclips.org:
Comments
Do you have corrections or additional information about this article? Leave a comment!
Do you have a question about what is described in this article? Please contact support here.
0 comments
Please sign in to leave a comment.