You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Wang Penghui <wa...@gmail.com> on 2006/12/21 05:08:32 UTC
Multiple designing.
Hello,
We are starting to design a ISP level JSP virutal hosting system which
could serve JSP and Servlets.
Here are some thing i decide to to:
Apache 2.0.52(RHEL 4 default installation)
Tomcat 5.5.20 (http://tomcat.apache.org)
Tomcat connector 1.2.18(http://tomcat.apache.org)
Add the follow lines in httpd.conf
JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
<Location "/WEB-INF/">
AllowOverride None
deny from all
</Location>
<Location "/META-INF/">
AllowOverride None
deny from all
</Location>
Then here is a example <VirtualHost> in httpd.conf
<VirtualHost 1.2.3.4>
SuexecUserGroup wangph clients
ServerAdmin root@localhost
ServerName wangph.example.com
DocumentRoot "/home/wangph/wwwroot"
ScriptAlias /cgi-bin/ /home/wangph/wwwroot/cgi-bin/
ScriptAlias /perl/ /home/wangph/wwwroot/cgi-bin/
ErrorLog logs/error_log
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
</VirtualHost>
And here is a example <Host> in server.xml
<Host className="org.apache.catalina.core.StandardHost" appBase=""
autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="0"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="wangph.example.com" unpackWARs="true">
<Context path="" docBase="/home/wangph/wwwroot" reloadable="true"
debug="0"/>
</Host>
I leave appBase blank. And point the docBase to the apache virtual
documentroot.
If i add a new virtual host, simply add one <VirutalHost> in httpd.conf
and one <Host> in server.xml.
Is there any problem?
Thanks very much
Wang Penghui
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re[2]: Multiple designing.
Posted by Dima Retov <di...@axisway.com>.
I ask that as we had similar idea to make shared hosting for tomcat.
The main problem for us was unloading code (context, sites).
It is complex to stop thread that do not wish to properly stop.
You can protect shutdown port with Security Manager that you must
implement for such project.
Abuser may create memory leaks by placing references to big objects.
As I understand you can't force to unload code.
.NET has "Application Domain" that is able to do that. It is used in
IIS. Java does not have such things.
--
<host> is not real problem. You can check how such things are
implemented in tomcat's admin page. It is JSP app that is able to add
recourses and adjust server.xml file.
--
Best regards,
Dima mailto:dima@axisway.com
Thursday, December 21, 2006, 10:47:39 AM, you wrote:
WP> Dima Retov ??:
>> WP> We are starting to design a ISP level JSP virutal hosting system which
>> WP> could serve JSP and Servlets.
>>
>> Would you use have 1 tomcat per server?
>>
>> If yes, Would you protect it from abusing code? e.g. Anyone would be
>> able to upload code with infinite loops to server.
>>
WP> Thanks for your response.
WP> I have installed only one tomcat server in a machine. If this is the
WP> thing you have mentioned by "1 tomcat per server", i think i have to
WP> protect the tomcat server from abusing code.
WP> But i don't know so much about tomcat configuration, the only things i
WP> have done to protect the security of the tomcat server is
WP> 1. use iptables blocked the internal ports
WP> 8009, etc ..
WP> 2. use -security option during start the tomcat server.
WP> To be more safely, what should i do with the server, or maybe you could
WP> point out some articles i have to read.
WP> Thanks again.
WP> Wang.
WP> ---------------------------------------------------------------------
WP> To start a new topic, e-mail: users@tomcat.apache.org
WP> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
WP> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Multiple designing.
Posted by Wang Penghui <wa...@gmail.com>.
Dima Retov 写道:
> WP> We are starting to design a ISP level JSP virutal hosting system which
> WP> could serve JSP and Servlets.
>
> Would you use have 1 tomcat per server?
>
> If yes, Would you protect it from abusing code? e.g. Anyone would be
> able to upload code with infinite loops to server.
>
Thanks for your response.
I have installed only one tomcat server in a machine. If this is the
thing you have mentioned by "1 tomcat per server", i think i have to
protect the tomcat server from abusing code.
But i don't know so much about tomcat configuration, the only things i
have done to protect the security of the tomcat server is
1. use iptables blocked the internal ports
8009, etc ..
2. use -security option during start the tomcat server.
To be more safely, what should i do with the server, or maybe you could
point out some articles i have to read.
Thanks again.
Wang.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Multiple designing.
Posted by Dima Retov <di...@axisway.com>.
WP> We are starting to design a ISP level JSP virutal hosting system which
WP> could serve JSP and Servlets.
Would you use have 1 tomcat per server?
If yes, Would you protect it from abusing code? e.g. Anyone would be
able to upload code with infinite loops to server.
--
Best regards,
Dima mailto:dima@axisway.com
Thursday, December 21, 2006, 6:08:32 AM, you wrote:
WP> Hello,
WP> We are starting to design a ISP level JSP virutal hosting system which
WP> could serve JSP and Servlets.
WP> Here are some thing i decide to to:
WP> Apache 2.0.52(RHEL 4 default installation)
WP> Tomcat 5.5.20 (http://tomcat.apache.org)
WP> Tomcat connector 1.2.18(http://tomcat.apache.org)
WP> Add the follow lines in httpd.conf
WP> JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
WP> JkLogFile /etc/httpd/logs/mod_jk.log
WP> JkLogLevel info
WP> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
WP> <Location "/WEB-INF/">
WP> AllowOverride None
WP> deny from all
WP> </Location>
WP> <Location "/META-INF/">
WP> AllowOverride None
WP> deny from all
WP> </Location>
WP> Then here is a example <VirtualHost> in httpd.conf
WP> <VirtualHost 1.2.3.4>
WP> SuexecUserGroup wangph clients
WP> ServerAdmin root@localhost
WP> ServerName wangph.example.com
WP> DocumentRoot "/home/wangph/wwwroot"
WP> ScriptAlias /cgi-bin/ /home/wangph/wwwroot/cgi-bin/
WP> ScriptAlias /perl/ /home/wangph/wwwroot/cgi-bin/
WP> ErrorLog logs/error_log
WP> JkMount /*.jsp ajp13
WP> JkMount /servlet/* ajp13
WP> </VirtualHost>
WP> And here is a example <Host> in server.xml
WP> <Host className="org.apache.catalina.core.StandardHost" appBase=""
WP> autoDeploy="true"
WP> configClass="org.apache.catalina.startup.ContextConfig"
WP> contextClass="org.apache.catalina.core.StandardContext" debug="0"
WP> deployXML="true"
WP> errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
WP> liveDeploy="true"
WP> mapperClass="org.apache.catalina.core.StandardHostMapper"
WP> name="wangph.example.com" unpackWARs="true">
WP> <Context path="" docBase="/home/wangph/wwwroot" reloadable="true"
debug="0"/>>
WP> </Host>
WP> I leave appBase blank. And point the docBase to the apache virtual
WP> documentroot.
WP> If i add a new virtual host, simply add one <VirutalHost> in httpd.conf
WP> and one <Host> in server.xml.
WP> Is there any problem?
WP> Thanks very much
WP> Wang Penghui
WP> ---------------------------------------------------------------------
WP> To start a new topic, e-mail: users@tomcat.apache.org
WP> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
WP> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org