Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Perl/mod_perl on shared web serversby lachoy (Parson) |
on Feb 14, 2002 at 05:26 UTC ( [id://145387]=note: print w/replies, xml ) | Need Help?? |
Unless you have a high traffic site, running mod_proxy works wonders. I don't know if it's feasible given your setup -- you can't restart the server to load the mod_proxy DSO -- but maybe they'll restart it for you. Or maybe it's already available. In a nutshell, you setup a pass-through on the server that's running now. It takes (all or some) requests on port 80 and passes them through to IP x port y. That process does what it needs to do then passes back the information to the proxy server, which passes it back to the client. The positives of this are that the backend can be anything on any port. Your statically-compiled mod_perl can run on 127.0.0.1:8001 with no problems since the port < 1024, and running on localhost is smart so nobody can get to it except through the proxy. The downsides are efficiency and complexity, although setting up mod_proxy is easy. This sort of setup is used often in the mod_perl world, but usually to save resources since the front-end servers can be lightweight (images, static files, etc.) and can save the interesting work for the heavyweight mod_perl servers. The mod_perl guide has more info about how to do this, along with discussion of other issues involved (headers, etc.) Chris
In Section
Meditations
|
|