Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - kwmiebach

#1
Dragonfly / Re: Start dragonfly on port 80
June 27, 2012, 11:34:00 AM
For more information see this question on stackoverflow:



http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-1024-on-l">http://stackoverflow.com/questions/4138 ... -1024-on-l">http://stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-1024-on-l



It is considered unsecure to do this in a production environment, but for development it can be nice.
#2
Dragonfly / Start dragonfly on port 80
June 27, 2012, 11:27:55 AM
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:


#!/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">http://localhost