Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux support #69

Open
MarcellVokk opened this issue Jan 4, 2024 · 2 comments
Open

Linux support #69

MarcellVokk opened this issue Jan 4, 2024 · 2 comments

Comments

@MarcellVokk
Copy link

Hi!

Does this library support linux?
I can't seem to get it working...

My code

var httpConfig = new ServerConfig()
.AddRoute(new HttpRequestHandler());

var httpsConfig = new ServerConfig()
.AddRoute(new HttpRequestHandler());
httpsConfig.LoadCertificate(@"./bfmeladdercom.pfx", "4j4k0c2c");

HttpServerTask = HttpServer.ListenAsync(
    new IPEndPoint(IPAddress.Any, 80),
    false,
    httpConfig
);

HttpsServerTask = HttpServer.ListenAsync(
    new IPEndPoint(IPAddress.Any, 443),
    true,
    httpsConfig
);

No requests are being received by HttpRequestHandler...

Publish/build config
Screenshot 2024-01-04 083209

Any help would be apreciated!

@kenkendk
Copy link
Owner

kenkendk commented Jan 4, 2024

On linux you need privileges before you can bind to ports less than 1024:

https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443

@MarcellVokk
Copy link
Author

I'm starting the process with "sudo ./server.sh"... Wouldn't that work? Do I need to do something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants