• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem Configuring Virtual Host in Resin

 
Aaron Beverly
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

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>
<host id='www.someotherdomain.com'>
<web-app id='/' document-directory='/home/some/other/dir'/>
</host>

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.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a dedicated forum for Resin questions. I'm moving this thread over there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic