Update create.sh
This commit is contained in:
parent
634891019e
commit
e3fe13246c
16
create.sh
16
create.sh
@ -62,13 +62,15 @@ echo " WSGIProcessGroup $name" >> /etc/apache2/sites-enabled/$name.conf
|
||||
echo " WSGIScriptAlias / $workingPath/project/wsgi.py" >> /etc/apache2/sites-enabled/$name.conf
|
||||
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 " </Location>" >> /etc/apache2/sites-enabled/$name.conf
|
||||
echo " RewriteEngine On" >> /etc/apache2/sites-enabled/$name.conf
|
||||
echo " RewriteCond %{HTTP:UPGRADE} ^WebSocket\$ [NC]" >> /etc/apache2/sites-enabled/$name.conf
|
||||
echo " RewriteCond %{HTTP:CONNECTION} Upgrade\$ [NC]" >> /etc/apache2/sites-enabled/$name.conf
|
||||
echo " RewriteRule .* ws://localhost:$nodePort%{REQUEST_URI} [P]" >> /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 /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
|
||||
|
Loading…
x
Reference in New Issue
Block a user