Daniel Bjuhr

Greenhorn
+ Follow
since Dec 03, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Daniel Bjuhr

Yes, if each virtual host is "owned" by a different customer. I used to do this so that I could allow users to restart a VM if something went wrong, without breaking everyone else's applications!
This is exactly my problem. I used Resin as standalone server without Apache, resulting in that each time a new customer arrived I had to edit "resin.conf". That resulted in that all current applications went down and where logged out.
I have now tryed to run Resin with multiple JVM:s together with Apache that takes care of the virtual hosts. I can now start and stop each application in Resin separatley and also start new applications in Resin without interrupting the other applications.
After adding a new webbapplication in Resin I adds a virtual host in Apache and restarts it.
This seems to work, but gets very unstable. I wonder if it has to do with the communication between Apache and Resin?
Sometimes I get the proper response from a webapplication and other times I gets the jsp code as response. The jsp code probably comes directly from Apache that maybe doesn't gets contact with Resin all times?
Does anyone know how to set up this correctly???
I have used Resin 3.0.4 and Apache 2.0.48.
This is my conf files:
I start a webapplication with following command:
/home/resin/bin/httpd.sh -conf /home/resin/conf/www.mydomain.com.conf -pid /home/resin/conf/www.mydomain.com.pid start

This is how the conf file for the webapp in Resin looks like:
<resin xmlns="http://caucho.com/ns/resin">
<resin:include href="common.conf"/>
<cluster>
<srun id="" host="127.0.0.1" port="6802" index="1"/>
</cluster>
<host id='www.mydomain.com'>
<web-app id='' document-directory='/home/myapps/mydomain'/>
</host>
</server>
</resin>

This is how the mapping in Apache looks like:
LoadModule caucho_module /usr/local/apache2/modules/mod_caucho.so
<IfModule mod_caucho.c>
ResinConfigServer localhost 6802
<Location /caucho-status>
SetHandler caucho-status
</Location>
</IfModule>
NameVirtualHost 192.168.0.1
<VirtualHost 192.168.0.1>
ServerName www.mydomain.com
ResinConfigServer 192.168.0.1 6802
DirectoryIndex index.jsp
DocumentRoot /home/myapps/mydomain
<Location /caucho-status>
SetHandler caucho-status
</Location>
</VirtualHost>
21 years ago