Start dragonfly on port 80

Started by kwmiebach, June 27, 2012, 11:27:55 AM

Previous topic - Next topic


I found a way to run dragonfly directly on port 80 on linux.

First I found out where the newlisp binary is:

$ ls -l `which newlisp`

lrwxrwxrwx 1 root root 14 Jun 26 23:37 /usr/bin/newlisp -> newlisp-10.3.4

This tells me that the binary is at /usr/bin/newlisp-10.3.4

I use the setcap command to allow binding it to ports below 1024:

$ sudo setcap 'cap_net_bind_service=+ep' /usr/bin/newlisp-10.3.4

Now I change the start script example-site/newlispServer so it looks like this:



if [ ! -f $NEWLISP_REDIRECTION ] ; then
        echo "ERROR: cannot find file: $NEWLISP_REDIRECTION"
        exit 1

echo "If all goes well visit http://localhost in your browser"
newlisp "$NEWLISP_REDIRECTION" -http -d 80 -w . $*

I removed :8080 after localhost and changed 8080 to 80 in the last line.

Now the example site runs on http://localhost">http://localhost


For more information see this question on stackoverflow:"> ... -1024-on-l">

It is considered unsecure to do this in a production environment, but for development it can be nice.