Mochiweb Port 80
Asked Answered
S

2

5

I am attempting to run BeepBeep through Mochiweb on Port 80. It works if I type sudo ./start_server.sh. Are there any security risks with running Mochiweb like this? If so how to remedy?

Thanks!

Sitka answered 29/9, 2009 at 0:54 Comment(0)
U
6

running any service as root has risk. It's hard to answer your question properly without more information though. Is this a production service or a dev instance you are running?

If production I would recommend running the mochiweb instance on a different port so it can run as a user and then using a proxy like nginx or apache to listen on 80 and forward the request.

Unspeakable answered 29/9, 2009 at 1:40 Comment(3)
A boring thing with using nginx as a proxy is that one cant do streaming. It wants to read the backend response to the end before it starts to serve the client request.Salzman
Ah, thanks. Yeah, it's a dev server, and I think port forwarding is the answer like you mentioned. Thanks a lot.Sitka
The other answer was the port forwarding one =)Alignment
S
3

You could start it on an unprivileged port and do port-forwarding in your firewall, so that port 80 goes to your unprivileged port.

Salzman answered 29/9, 2009 at 6:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.