nemasu / asmttpd

Web server for Linux written in amd64 assembly.
GNU General Public License v2.0
3.03k stars 199 forks source link

Use on another port #25

Closed glsdesign closed 8 years ago

glsdesign commented 8 years ago

Hi, newbie here. I'd like to use asmttpd serving on port 5552 (decimal) which in hex is 0x15B0. I've changed LISTEN_PORT in main.asm accordingly, but it wont load. I suspect it is something about the hex value format, the default is 0x5000 for port 80 and not 0x50 as expected (by me). 0x15B000 doesn't work also. Also, how can I run it without sudo?

nemasu commented 8 years ago

Hello,

The port number is in network byte order, or little-endian, so the bytes are backwards. To use port 5552, change the port number to: 0xB015. Once you do this, you should be able to run it as a normal user, the only reason it won't let you originally is because you need root privileges to listen on port 80.

Hope that helped.

glsdesign commented 8 years ago

Thanks, solved now.