THttpServer Port 80

Hi,
For specific testing purposes, I’m trying to start THttpServer on port 80:

THttpServer *server = new THttpServer("http:80?nocache");

Even if started with sudo, I get:

Info in <THttpEngine::Create>: Starting HTTP server on port 80
Error in <THttpEngine::Log>: cannot bind to 80: 13 (Permission denied)

(I double-checked that port 80 is not currently being used by another process).

Is there something that prevents THttpServer to start on port 80? (Maybe @linev would have an idea?)

Thank you

Hi,

It is your host system settings prevents opening http port 80 - with normal user rights.
Depending from OS flavor there are different methods to allow this.

Like this one:

https://serverfault.com/questions/112795/how-to-run-a-server-on-port-80-as-a-normal-user-on-linux

Regards,
Sergey

Thank you very much @linev. In fact, my bad, after checking I was not starting with sudo but incorrectly with setuid/setgid. Now fixed when simply using sudo.