This is how I've installed mod_pywebsocket
as apache extension
root@senior:/var/www# wget http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.7.8.tar.gz
root@senior:/var/www# tar xvf mod_pywebsocket-0.7.8.tar.gz
root@senior:/var/www# cd pywebsocket-0.7.8/src/
root@senior:/var/www/pywebsocket-0.7.8/src# py:/./setpuup.py build
running build
running build_py
root@senior:/var/www/pywebsocket-0.7.8/src# python ./setup.py install
running install
running build
running build_py
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.6/dist-packages/mod_pywebsocket-0.7.8.egg-info
Writing /usr/local/lib/python2.6/dist-packages/mod_pywebsocket-0.7.8.egg-info
root@senior:/var/www/pywebsocket-0.7.8/src# mkdir /var/www/_wsh/
root@senior:/var/www/pywebsocket-0.7.8/src# cp example/* /var/www/_wsh/
root@senior:/var/www/pywebsocket-0.7.8/src# cd /var/www/_wsh/
root@senior:/var/www/_wsh# chmod a+x *.py
root@senior:/usr/local/lib/python2.6/dist-packages/mod_pywebsocket# cd /usr/local/lib/python2.6/dist-packages/mod_pywebsocket
root@senior:/usr/local/lib/python2.6/dist-packages/mod_pywebsocket# chmod a+rx *.py
Here is mine text inserted in httpd.conf
<IfModule python_module>
PythonPath "sys.path+['/usr/local/lib/python2.6/dist-packages']"
PythonOption mod_pywebsocket.handler_root /var/www/_wsh/
PythonOption mod_pywebsocket.handler_scan /var/www/_wsh/
#PythonOption mod_pywebsocket.allow_draft75 On
#<Location /var/www/_vsh>
# PythonHeaderParserHandler mod_pywebsocket.headerparserhandler
#</Location>
</IfModule>
After apaceh restart, I'm trying console.html
code from examples of pywebsocket directory (copied in /var/www/_wsh). But it doesnt work, I cant open the connection.
When I try to run example I got this
root@senior:/usr# /var/www/_wsh/echo_client.py
Traceback (most recent call last):
File "/var/www/_wsh/echo_client.py", line 995, in <module>
main()
File "/var/www/_wsh/echo_client.py", line 991, in main
EchoClient(options).run()
File "/var/www/_wsh/echo_client.py", line 840, in run
self._handshake.handshake()
File "/var/www/_wsh/echo_client.py", line 385, in handshake
'Expected HTTP status code 101 but found %r' % status_code)
__main__.ClientHandshakeError: Expected HTTP status code 101 but found '200'
Could you please help me find out where is the problem? Thank you