Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

for MAC OSX Users

Norio Kobota @nori0428 edited this page Nov 25, 2013 · 12 revisions

0 . install MAC ports from http://www.macports.org/

1 . install dependent tools and libs

$ sudo port install automake libtool

$ sudo port install pcre

$ sudo port install openssl

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!:)

Clone this wiki locally