File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Java Products and Servers and the fly likes Problem Configuring Virtual Hosts in Standalone Resin Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Problem Configuring Virtual Hosts in Standalone Resin" Watch "Problem Configuring Virtual Hosts in Standalone Resin" New topic

Problem Configuring Virtual Hosts in Standalone Resin

Aaron Beverly

Joined: Sep 10, 2003
Posts: 19

I am running Resin App Server 3.0.4. For now, it is running as a standalone server, and everything work fine except for one minor (major) detail.

In my resin.conf, I configure virtual hosts like so:

<host id=''>
<web-app id='/' document-directory='/home/some/dir'/>
<host id=''>
<web-app id='/' document-directory='/home/some/other/dir'/>

I have not altered my resin.conf in any other way (except to add a database pool configuration, which works correctly)

When I do this, both virtual hosts seem to work, which is to say, I can ask for them in a browser and pages a served. However, BOTH virtual hosts serve the same files, and moreover, the files are not being served from the location specified in the document-directory attribute. Instead, they are always served from webapps/ROOT. No matter what I do, this is always the case for every configured host.

The output of my server logs shows that both hosts start up, both applications start up, and no errors occur.

I have tried using "document-directory" as an attribute (as shown above), a seperate element (as shown in the resin documentation for virtual host configuration), I have tried to configure the hosts without the "web-app" element (this never works, I cannot serve any files then). All to no avail. The same result obtains in every case.

Does anyone know what on EARTH is the problem here? I have spent several hours fiddling with this thing and I simply cannot fathom what I am doing wrong.
Weather Man

Joined: Jan 03, 2005
Posts: 1
This one ails me too! Anyone got a solution already?
I agree. Here's the link:
subject: Problem Configuring Virtual Hosts in Standalone Resin
jQuery in Action, 3rd edition