Browse Source

fixed reverse proxy for websockets

tags/v0.1.0
Robin Thoni 7 years ago
parent
commit
0c96006412
2 changed files with 12 additions and 2 deletions
  1. 1
    1
      frontend/Dockerfile
  2. 11
    1
      frontend/apache2.conf

+ 1
- 1
frontend/Dockerfile View File

30
     ln -s /dev/stdout /var/log/apache2/access.log &&\
30
     ln -s /dev/stdout /var/log/apache2/access.log &&\
31
     ln -s /dev/stdout /var/log/apache2/other_vhosts_access.log
31
     ln -s /dev/stdout /var/log/apache2/other_vhosts_access.log
32
 
32
 
33
-RUN a2enmod proxy_http
33
+RUN a2enmod proxy_http proxy_wstunnel
34
 
34
 
35
 COPY apache2.conf /etc/apache2/apache2.conf
35
 COPY apache2.conf /etc/apache2/apache2.conf
36
 
36
 

+ 11
- 1
frontend/apache2.conf View File

39
 </Directory>
39
 </Directory>
40
 
40
 
41
 <Location "/api/">
41
 <Location "/api/">
42
-  ProxyPass http://BACKEND_HOST:BACKEND_PORT/
42
+  ProxyPass http://BACKEND_HOST:BACKEND_PORT/ retry=0
43
   ProxyPassReverse http://BACKEND_HOST:BACKEND_PORT/
43
   ProxyPassReverse http://BACKEND_HOST:BACKEND_PORT/
44
 </Location>
44
 </Location>
45
+<Location "/signalr/">
46
+  ProxyPass http://BACKEND_HOST:BACKEND_PORT/signalr/ retry=0
47
+  ProxyPassReverse http://BACKEND_HOST:BACKEND_PORT/signalr/
48
+</Location>
49
+<Location "/signalr/connect">
50
+  ProxyPass ws://BACKEND_HOST:BACKEND_PORT/signalr/connect retry=0
51
+</Location>
52
+<Location "/signalr/reconnect">
53
+  ProxyPass ws://BACKEND_HOST:BACKEND_PORT/signalr/reconnect retry=0
54
+</Location>
45
 
55
 
46
 
56
 
47
 LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
57
 LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined

Loading…
Cancel
Save