For accessing other servers' resources transparently, setting up the web server to support reverse proxy.
In lighttpd, the steps:
1. add 'mod_proxy' in server module group;
2. set up the server as:
=================================================
$HTTP["host"] == "rails.qiang.com" {
server.document-root = "/rails/sample/public"
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
server.error-handler-404 = "/dispatch.fcgi"
server.errorlog = "/rails/sample/lighttpd.log"
fastcgi.server = ( ".fcgi" =>
( "localhost" =>
(
"min-procs" => 2,
"max-procs" => 4,
"socket" => "/tmp/stage-fcgi.socket",
"bin-path" => "/rails/sample/public/dispatch.fcgi",
"bin-environment" => ("RAILS_ENV" => "rail")
)
))
proxy.server = ( "/other" => ( "other" => ("host" => "1.1.1.1/other", "port" => 80)))
}
=================================================
For apache, please read the followed link: http://www.apachetutor.org/admin/reverseproxies.
Monday, May 28, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment