{"id":1674,"date":"2014-03-05T13:40:29","date_gmt":"2014-03-05T20:40:29","guid":{"rendered":"http:\/\/xiehang.com\/blog\/?p=1674"},"modified":"2014-03-20T07:00:22","modified_gmt":"2014-03-20T14:00:22","slug":"proxysourceaddress-under-apache-httpd","status":"publish","type":"post","link":"https:\/\/xiehang.com\/blog\/2014\/03\/05\/proxysourceaddress-under-apache-httpd\/","title":{"rendered":"ProxySourceAddress under Apache HTTPd"},"content":{"rendered":"

I just could not make it work although it seems pretty easy and straightforward.<\/p>\n

I have a machine with 4 IPs (216.x.x.203~206), and start Apache listening on 1203~1206 for each IP, then for each VirtualHost (such as 216.x.x.203:1203) I turn on ProxyRequests, and set ProxySourceAddress to that IP address, thus client connecting to 203 will have their request go out through 203 as well.<\/p>\n

It just didn’t work, I’m having this kind of messages in error_log:
\n
\n(98)Address already in use: [client 192.168.0.11:48822] AH00938: CONNECT: failed to bind socket to local address
\n<\/code><\/p>\n

Tried various configuration changes but didn’t make any difference. Since I was in a hurry to get my job done, so I switch to squid – everything was up and running as expected in ~15 min. Thinking of I never play with squid before, I have to say, squid is pretty user (read: admin) friendly.<\/p>\n

I’ve downloaded code from for httpd-2.4.7, and will dig in to see if it was because of my potential stupid mistakes, let’s see how things work. <\/p>\n","protected":false},"excerpt":{"rendered":"

I just could not make it work although it seems pretty easy and straightforward. I have a machine with 4 IPs (216.x.x.203~206), and start Apache listening on 1203~1206 for each IP, then for each VirtualHost (such as 216.x.x.203:1203) I turn on ProxyRequests, and set ProxySourceAddress to that IP address, thus client connecting to 203 will […]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[82,480,108,482,481],"_links":{"self":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1674"}],"collection":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/comments?post=1674"}],"version-history":[{"count":2,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1674\/revisions"}],"predecessor-version":[{"id":1680,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/posts\/1674\/revisions\/1680"}],"wp:attachment":[{"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/media?parent=1674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/categories?post=1674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xiehang.com\/blog\/wp-json\/wp\/v2\/tags?post=1674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}