David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 1 | <IfModule proxy_module> |
| 2 | ProxyPreserveHost on |
| 3 | |
| 4 | # Map /fabric to the onos instance that is controlling the leaf |
| 5 | # spine fabric |
| 6 | <Location /fabric/> |
| 7 | ProxyPass http://onos-fabric:8181/ |
| 8 | ProxyPassReverse http://onos-fabric:8181/ |
| 9 | ProxyPassReverseCookiePath "/" "/fabric/" |
| 10 | Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/fabric$2" |
| 11 | </Location> |
| 12 | |
| 13 | <Location /fabric/onos/ui/websock/> |
| 14 | ProxyPass "ws://onos-fabric:8181/onos/ui/websock/" disablereuse=on |
| 15 | </Location> |
| 16 | |
| 17 | # Map /vtn to the onos instance that is controller the cordvtn |
| 18 | # application |
| 19 | <Location /vtn/> |
Scott Baker | b4adda0 | 2016-12-05 21:06:35 -0800 | [diff] [blame] | 20 | ProxyPass http://onos-cord:8182/ |
| 21 | ProxyPassReverse http://onos-cord:8182/ |
David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 22 | ProxyPassReverseCookiePath "/" "/vtn/" |
| 23 | Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/vtn$2" |
| 24 | </Location> |
| 25 | |
| 26 | <Location /vtn/onos/ui/websock/> |
Scott Baker | b4adda0 | 2016-12-05 21:06:35 -0800 | [diff] [blame] | 27 | ProxyPass "ws://onos-cord:8182/onos/ui/websock/" disablereuse=on |
David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 28 | </Location> |
| 29 | |
Matteo Scandolo | 5c71a4b | 2017-01-10 12:00:50 -0800 | [diff] [blame] | 30 | # Cord SPA and rest-gw |
| 31 | ProxyPass /spa http://xos-spa-gui:4000 |
| 32 | ProxyPass /spa/api http://xos-rest-gw:3000/api |
| 33 | ProxyPass /spa/socket.io http://xos-rest-gw:3000/socket.io |
| 34 | ProxyPass /socket.io http://xos-rest-gw:3000/socket.io |
| 35 | <Location /socket.io> |
| 36 | RewriteEngine on |
| 37 | RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] |
| 38 | RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] |
| 39 | RewriteRule .* ws://xos-rest-gw:3000%{REQUEST_URI} [P] |
| 40 | </Location> |
| 41 | |
David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 42 | # Map the various XOS roots to the XOS instance |
Matteo Scandolo | 5c71a4b | 2017-01-10 12:00:50 -0800 | [diff] [blame] | 43 | ProxyPass /xos http://xos:9000 |
| 44 | ProxyPass /xos/ http://xos:9000/ |
| 45 | ProxyPassMatch /(api)$ http://xos:9000/$1/ |
| 46 | ProxyPass /api/ http://xos:9000/api/ |
| 47 | ProxyPass /login http://xos:9000/login |
| 48 | ProxyPass /admin/ http://xos:9000/admin/ |
| 49 | ProxyPass /static/ http://xos:9000/static/ |
| 50 | ProxyPass /loggedin/ http://xos:9000/loggedin/ |
| 51 | ProxyPass /serviceGrid/ http://xos:9000/serviceGrid/ |
Scott Baker | b719703 | 2017-02-02 11:32:42 -0800 | [diff] [blame] | 52 | |
| 53 | ProxyPass /xosapi/ http://xos-chameleon:9101/xosapi/ |
David K. Bainbridge | 49b75ef | 2016-08-24 15:24:15 -0700 | [diff] [blame] | 54 | </IfModule> |
| 55 | |
| 56 | <IfModule rewrite_module> |
| 57 | RewriteEngine On |
| 58 | # Redirect (permanently) requests for /MAAS to /MAAS/. |
| 59 | RewriteRule ^/MAAS$ %{REQUEST_URI}/ [R=301,L] |
| 60 | </IfModule> |
| 61 | |
| 62 | # Redirects so that basic URLs entered go the right place |
| 63 | Redirect /fabric /fabric/onos/ui |
| 64 | Redirect /vtn /vtn/onos/ui |