reverse proxy をさせたいけど、nginx や apache を使うほどでもないようなときに。
/etc/xinetd.d/proxy-http
# default: on
service http
{
port = 80
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/nc
server_args = -w 5 192.168.4.99 80
disable = no
}
https の場合:
/etc/xinetd.d/proxy-https
# default: on
service https
{
port = 443
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/nc
server_args = -w 5 192.168.4.99 443
disable = no
}