for Ubuntu Users - nori0428/mod_websocket GitHub Wiki

1 . install dependent tools and libs

$ sudo apt-get install automake libtool

$ sudo apt-get install libpcre3 libpcre3-dev

$ sudo apt-get install openssl libssl-dev

2 . get mod_websocket from github

$ git clone --recursive git://github.com/nori0428/mod_websocket.git

3 . configure mod_websocket

$ cd mod_websocket

$ ./bootstrap

$ ./configure [--with-websocket=[ALL, IETF-00, RFC-6455]]

4 . test mod_websocket

$ make clean check

5 . install mod_websocket into lighttpd dir

$ ./configure --with-lighttpd=/path/to/lighttpd_top_srcdir

$ make install

6 . configure lighttpd

$ cd /path/to/lighttpd_top_srcdir

$ sh ./autogen.sh

$ ./configure --with-websocket[=ALL, RFC-6455, IETF-00] [--with-openssl]

Perhaps some additional libs(zlib and bzip2 etc.) are required from lighttpd. Please install them.

7 . make and make install lighttpd

$ make

$ sudo make install

8 . write lighttpd.conf

$ vi /path/to/lighttpd_top_srcdir/doc/config/conf.d/mod.template

server.modules += ( "mod_websocket" )

websocket.server = ( "/chat" =>
                            (
                             "host" => "127.0.0.1",
                             "port" => "9000"
                            )
                   )
# If U want to handle timeout, define websocket.timeout.(sec)
# websocket.timeout = 60
#
# If U want to send PING frame defined at after IETF-08 spec.,
# define websocket.ping_interval.(sec)
# websocket.ping_interval = 5
#
# If something wrong, define websocket.debug.
# logs are written into server.errorlog
# 0: no log
# 1: LOG_ERROR
# 2: LOG_WARN
# 3: LOG_INFO
# 4: LOG_DEBUG
# websocket.debug = 4

:w websocket.conf

9 . run lighttpd. have fun!:)