From bc1bb7fea2d532c00803d102e68bfb2e29b6e3c7 Mon Sep 17 00:00:00 2001 From: william mantly Date: Sat, 1 Oct 2016 15:23:01 -0400 Subject: [PATCH] node --- create.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/create.sh b/create.sh index 26e4bbf..605b6ea 100644 --- a/create.sh +++ b/create.sh @@ -59,10 +59,12 @@ echo " Alias /static $workingPath/staticfiles" >> /etc/apache2/sites-enabled/ echo " WSGIDaemonProcess $name python-path=$workingPath:$workingPath/env:$workingPath/env/lib/python3.5/site-packages" >> /etc/apache2/sites-enabled/$name.conf echo " WSGIProcessGroup $name" >> /etc/apache2/sites-enabled/$name.conf echo " WSGIScriptAlias / $workingPath/project/wsgi.py" >> /etc/apache2/sites-enabled/$name.conf -echo " " >> /etc/apache2/sites-enabled/$name.conf -echo " ProxyPass http://localhost:$nodePort/socket.io" >> /etc/apache2/sites-enabled/$name.conf -echo " ProxyPassReverse http://localhost:$nodePort/socket.io" >> /etc/apache2/sites-enabled/$name.conf -echo " " >> /etc/apache2/sites-enabled/$name.conf +echo " # socket.io conf" >> /etc/apache2/sites-enabled/$name.conf +echo " RewriteEngine On" >> /etc/apache2/sites-enabled/$name.conf +echo " RewriteCond %{REQUEST_URI} ^/socket.io/1/websocket [NC]" >> /etc/apache2/sites-enabled/$name.conf +echo " RewriteRule /(.*) ws://localhost:$nodePort/$1 [P,L]" >> /etc/apache2/sites-enabled/$name.conf +echo " ProxyPass /socket.io http://localhost:$nodePort/socket.io" >> /etc/apache2/sites-enabled/$name.conf +echo " ProxyPassReverse /socket.io http://localhost:$nodePort/socket.io" >> /etc/apache2/sites-enabled/$name.conf echo "" >> /etc/apache2/sites-enabled/$name.conf /usr/sbin/service apache2 restart