This commit is contained in:
2016-10-01 17:32:25 -04:00
parent 560629e5bb
commit 73e46f0ce9

View File

@ -63,32 +63,12 @@ echo " WSGIScriptAlias / $workingPath/project/wsgi.py" >> /etc/apache2/sites-
echo " # socket.io conf" >> /etc/apache2/sites-enabled/$name.conf
echo " <Location '/socket.io'>" >> /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 socket.io/(.*) ws://localhost:$nodePort/socket.io/\$1 [P,L]" >> /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 " ProxyPass ws://localhost:$nodePort/socket.io" >> /etc/apache2/sites-enabled/$name.conf
echo " ProxyPass wss://localhost:$nodePort/socket.io" >> /etc/apache2/sites-enabled/$name.conf
echo " </Location>" >> /etc/apache2/sites-enabled/$name.conf
# echo " RewriteEngine on" >> /etc/apache2/sites-enabled/$name.conf
# echo " RewriteCond %{QUERY_STRING} transport=polling" >> /etc/apache2/sites-enabled/$name.conf
# echo " RewriteRule /(.*)$ http://localhost:$nodePort/\$1 [P]" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyRequests off" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyPass /socket.io/ ws://localhost:$nodePort/\socket.io/" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyPassReverse /socket.io/ ws://localhost:$nodePort/\socket.io/" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyPreserveHost On" >> /etc/apache2/sites-enabled/$name.conf
# echo " # these next two lines are to enable the wstunnel" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyPass /socket.io/1/websocket ws://localhost:$nodePort/socket.io/1/websocket" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyPassReverse /socket.io/1/websocket ws://localhost:$nodePort/socket.io/1/websocket" >> /etc/apache2/sites-enabled/$name.conf
# echo " # this line is to retrieve the socket.io.js to use" >> /etc/apache2/sites-enabled/$name.conf
# echo " ProxyPass /socket.io/ http://localhost:$nodePort/socket.io/" >> /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 "</VirtualHost>" >> /etc/apache2/sites-enabled/$name.conf
/usr/sbin/service apache2 restart