Mg_http_listen() URL for listening to port number for all ip

#1

Hi,

I was trying the example of http-restful-server with URL http://localhost:8000. It only work in local machine. Trying to connect from another machine failed (not responding event at log level 3).

This happen in latest version 7. Previous version 6.18, listening is done at port no (8000) instead of hostname.

Best regards,

Radzi.

#2

Modify line 17 to

static const char *s_listen_on = "https://:8000";
#3

It says “sock.c:185:mg_open_listen invalid listening URL: https://:8000”

#4
static const char *s_listen_on = "https://0.0.0.0:8000";
#5

Thanks. It’s working now. But not with https because it’s not compiled with OPENSSL flag on.