TheFatherMind
08-09-2009, 05:57 AM
I am a bit miffed and perhaps a bit upset that my previous post was ignored and then discarded, as it was very important to me. Through the power of google cache I am now going to re-post it...
Greetings!
I am using resin 3.1 as supplied with and for ralio.
On the web server (apache) we are using "VirtualDocumentRoot" to create a virtual folder structure so that we do not have to restart or reconfigure the web server when adding sites. We have it broken down by domain name then subdomain.
/DocumentFolder/somedomain.com/www/index.html
The apache config for this would like like so..
VirtualDocumentRoot /DocumentFolder/%2.0.%3.0/%1.0
I cannot seem to get resin to be compatible with this. I have gotten close. I used the following config that gave us the ability to do it by the full domain name...
<host regexp="(.+)">
<host-name>${host.regexp[1]}</host-name>
<root-directory>DocumentFolder/${host.regexp[1]}</root-directory>
<web-app id="/" document-directory="."/>
</host>
With this above exmaple I would get <resin folder>/DocumentFolder/www.somedomain.com/index.html
So i tried MANY variations of...
<host regexp="(.*)\.([^\.]+\.[^\.]+)">
<host-name>${host.regexp[1]}.${host.regexp[2]}</host-name>
<root-directory>DocumentFolder/${host.regexp[2]}/${host.regexp[1]}</root-directory>
</host>
And just could not get it to work!
I also tried to simplify the regex with stuff like "(.+).(.+)" and "(.*)\.([^.]+\.[^.])" etc.. I understand the regex concept but am personally not very good with it. I am not sure what I am doing wrong and can find very little documentation on the regex concept for resin.
So to summarize I am trying to setup /domainname.com/subdomain/
Thank you for taking the time to read all of this! I really appreciate any help anyone can supply.
~ Merlin / TheFatherMind
Greetings!
I am using resin 3.1 as supplied with and for ralio.
On the web server (apache) we are using "VirtualDocumentRoot" to create a virtual folder structure so that we do not have to restart or reconfigure the web server when adding sites. We have it broken down by domain name then subdomain.
/DocumentFolder/somedomain.com/www/index.html
The apache config for this would like like so..
VirtualDocumentRoot /DocumentFolder/%2.0.%3.0/%1.0
I cannot seem to get resin to be compatible with this. I have gotten close. I used the following config that gave us the ability to do it by the full domain name...
<host regexp="(.+)">
<host-name>${host.regexp[1]}</host-name>
<root-directory>DocumentFolder/${host.regexp[1]}</root-directory>
<web-app id="/" document-directory="."/>
</host>
With this above exmaple I would get <resin folder>/DocumentFolder/www.somedomain.com/index.html
So i tried MANY variations of...
<host regexp="(.*)\.([^\.]+\.[^\.]+)">
<host-name>${host.regexp[1]}.${host.regexp[2]}</host-name>
<root-directory>DocumentFolder/${host.regexp[2]}/${host.regexp[1]}</root-directory>
</host>
And just could not get it to work!
I also tried to simplify the regex with stuff like "(.+).(.+)" and "(.*)\.([^.]+\.[^.])" etc.. I understand the regex concept but am personally not very good with it. I am not sure what I am doing wrong and can find very little documentation on the regex concept for resin.
So to summarize I am trying to setup /domainname.com/subdomain/
Thank you for taking the time to read all of this! I really appreciate any help anyone can supply.
~ Merlin / TheFatherMind