Using the standard https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md installation procedure on Centos 7, but:
The network connectivity on ports 80 & 443 is tested with nc thus:
echo -e "HTTP/1.1 200 OK\n\n $VERIFY" | nc -w 4 -l -p $PORT >/dev/null 2>&1 &
if curl --proto =http -s $HOST:$PORT --connect-timeout 3 | grep $VERIFY >/dev/null 2>&1; then
:
But nc fails with
nc: cannot use -p and -l
making the setup script report unavailability on those ports.
man nc says:
-l Listen for an incoming connection rather than initiating a connection to a remote host. Cannot be used together with any of the options -psxz. Additionally, any timeouts specified
with the -w option are ignored.
It may be an nc version problem, I see nc linux command man page does not say that there’s any conflict with the two. My netcat can listen, but only using
nc -w 4 -l <IP address> <port number>
Can’t get netcat to tell me its version number