-
Notifications
You must be signed in to change notification settings - Fork 370
HTTP Proxy Configuration
Patrick Stadler edited this page Jul 4, 2013
·
13 revisions
AddDefaultCharset UTF-8
Options +MultiViews
RewriteEngine On
RewriteRule http-bind/ http://yourhost.com:5280/http-bind/ [P]
- Requirements: mod_rewrite, mod_proxy, mod_proxy_http
- Documentation: http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_p
location /http-bind/ {
proxy_pass http://yourhost.com:5280/http-bind/;
proxy_buffering off;
tcp_nodelay on;
}
- Requirements: http_proxy_module
- Documentation: http://wiki.nginx.org/HttpProxyModule
proxy.server = (
"http-bind/" =>
( (
"host" => "127.0.0.1",
"port" => 5280
) )
)
- Requirements: mod_proxy
- Documentation: http://redmine.lighttpd.net/wiki/1/Docs:ModProxy
-
Application Request Routing Cache -> enable proxy checked
-
URL Rewrite module
1. create blank inbound rule 2. Name it. 3. Requested URL drop: Matches the pattern selected 4. Using drop: Regular expressions selected 5. Pattern: http-bind/ (ignore case check checked) 6. No conditions or server variables(unless you know what you doing) 7. Action type: Rewrite 8. Rewrite URL: http://yoursite:port/http-bind/
p.s. When initiating Candy chat remember to use 'http://yoursite/http-bind/' for service,
- Requirements: iis 7 + Application Request Routing Cache + URL Rewrite module
- Documentation: http://www.iis.net/download/URLRewrite
Write a simple HTTP proxy for node.js. Check out candy-node for a complete solution.
var http = require('http');
http.createServer(function(request, response) {
if(request.url === '/http-bind/') {
var proxy_request = http.request({
host: 'yourhost.com',
port: 5280,
path: '/http-bind/',
method: request.method
});
proxy_request.on('response', function(proxy_response) {
proxy_response.on('data', function(chunk) {
response.write(chunk, 'binary');
});
proxy_request.on('end', function() {
response.end();
});
response.writeHead(proxy_response.statusCode, proxy_response.headers);
});
request.on('data', function(chunk) {
proxy_request.write(chunk, 'binary');
});
request.on('end', function() {
proxy_request.end();
});
}
}).listen(80);