• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Problem Configuring Virtual Host in Resin

Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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='www.somedomain.com'>
<web-app id='/' document-directory='/home/some/dir'/>
<host id='www.someotherdomain.com'>
<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.
Posts: 11962
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a dedicated forum for Resin questions. I'm moving this thread over there.
    Bookmark Topic Watch Topic
  • New Topic