I need to have very simple, lightweight service that always redirects to another URL. No request parsing is needed so there should be no security risk.
- https://www.debian-administration.org/article/371/A_web_server_in_a_shell_script
- http://www.w3.org/Provider/ShellScript.html
echo "HTTP/1.1 302 Found"
echo "Location: http://www.example.com"
echo
echo
service myredir
{
disable = no
port = 80
flags = IPv6
socket_type = stream
wait = no
user = root
server = /root/myredir.sh
server_args = --daemon
log_on_failure += USERID
}