2 Description=Subscriptions Port 80 to 443 Redirect
6 # Set the domain of your instance here:
7 Environment=DOMAIN=subscriptions.gir.st
10 ExecStart=/usr/bin/nc -lkc 'read method path http; printf "HTTP/1.1 308 Moved\r\nLocation: https://${DOMAIN}%%s\r\n\r\n" "$path"' 80
11 Restart=always # NOTE^: must to escape % in ExecStart, or systemd replaces %s with $SHELL
14 WantedBy=multi-user.target