Start dragonfly on port 80

A web framework in newLISP

Start dragonfly on port 80

Postby kwmiebach » Wed Jun 27, 2012 6:27 pm

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:

Code: Select all
#!/bin/sh

NEWLISP_REDIRECTION="./dragonfly-framework/newlisp-redirection.lsp"

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

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
Last edited by kwmiebach on Wed Jun 27, 2012 6:41 pm, edited 1 time in total.
kwmiebach
 
Posts: 2
Joined: Wed Jun 27, 2012 6:14 pm

Re: Start dragonfly on port 80

Postby kwmiebach » Wed Jun 27, 2012 6:34 pm

For more information see this question on stackoverflow:

http://stackoverflow.com/questions/4138 ... -1024-on-l

It is considered unsecure to do this in a production environment, but for development it can be nice.
kwmiebach
 
Posts: 2
Joined: Wed Jun 27, 2012 6:14 pm


Return to Dragonfly

Who is online

Users browsing this forum: No registered users and 1 guest