I am experimenting with several languages (Python, Ruby...), and I would like to know if there is a way to optimize my Apache Server to load certain modules only in certain VirtualHost, for instance:
http://myapp1 <- just with Ruby support
http://myapp2 <- just with Python support
http://myapp3 <- just with Php support
...
Thanks.
Each Apache worker loads every module, so it's not possible to do within Apache itself.
What you need to do is move your language modules to processes external to Apache workers.
This is done for your languages with the following modules:
I dont think thats possible as,
I think the only way is to have a "proxy" web server that dispatches requests to the real servers ...
The proxy server has a list of domain names -> Server Side language, and does nothing else but transparently redirecting to the correct real server
There are N real server, each one with a specific configuration and a single language supported and loaded ... each server will listen on a different port of course and eventually only on the loopback device
Apache mod_proxy should do the job
My 2 cents
My Idea is several apache processes (each one with different config) listening on different addresses and/or ports and a http proxy (squid or apache) in the front redirecting to respective server. This has a possible added advantage of caching.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.