xinetd as a poor man’s web server for issuing redirects

Set up a profile in /etc/xinetd.d called http:

# default: off
# description: Poor man’s http server that simply issues redirects.
service http
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /bin/echo
        server_args     = -e HTTP/1.1 301 Moved Permanently\r\nLocation: https://somewhere:8443\r\n
        disable         = no


(Re-)Start xinetd and now you have a simple redirect server – no httpd or other web server required.