blob: 896e10c99e489f83da541629b6754f4605ce8cba [file] [log] [blame]
David K. Bainbridge49b75ef2016-08-24 15:24:15 -07001<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 Bakerb4adda02016-12-05 21:06:35 -080020 ProxyPass http://onos-cord:8182/
21 ProxyPassReverse http://onos-cord:8182/
David K. Bainbridge49b75ef2016-08-24 15:24:15 -070022 ProxyPassReverseCookiePath "/" "/vtn/"
23 Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/vtn$2"
24 </Location>
25
26 <Location /vtn/onos/ui/websock/>
Scott Bakerb4adda02016-12-05 21:06:35 -080027 ProxyPass "ws://onos-cord:8182/onos/ui/websock/" disablereuse=on
David K. Bainbridge49b75ef2016-08-24 15:24:15 -070028 </Location>
29
Matteo Scandolo5c71a4b2017-01-10 12:00:50 -080030 # Cord SPA and rest-gw
31 ProxyPass /spa http://xos-spa-gui:4000
Matteo Scandolo5c71a4b2017-01-10 12:00:50 -080032 ProxyPass /spa/socket.io http://xos-rest-gw:3000/socket.io
33 ProxyPass /socket.io http://xos-rest-gw:3000/socket.io
34 <Location /socket.io>
35 RewriteEngine on
36 RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
37 RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
38 RewriteRule .* ws://xos-rest-gw:3000%{REQUEST_URI} [P]
39 </Location>
40
David K. Bainbridge49b75ef2016-08-24 15:24:15 -070041 # Map the various XOS roots to the XOS instance
Matteo Scandolo5c71a4b2017-01-10 12:00:50 -080042 ProxyPass /xos http://xos:9000
43 ProxyPass /xos/ http://xos:9000/
44 ProxyPassMatch /(api)$ http://xos:9000/$1/
45 ProxyPass /api/ http://xos:9000/api/
46 ProxyPass /login http://xos:9000/login
47 ProxyPass /admin/ http://xos:9000/admin/
48 ProxyPass /static/ http://xos:9000/static/
49 ProxyPass /loggedin/ http://xos:9000/loggedin/
50 ProxyPass /serviceGrid/ http://xos:9000/serviceGrid/
Scott Bakerb7197032017-02-02 11:32:42 -080051
52 ProxyPass /xosapi/ http://xos-chameleon:9101/xosapi/
David K. Bainbridge49b75ef2016-08-24 15:24:15 -070053</IfModule>
54
55<IfModule rewrite_module>
56 RewriteEngine On
57 # Redirect (permanently) requests for /MAAS to /MAAS/.
58 RewriteRule ^/MAAS$ %{REQUEST_URI}/ [R=301,L]
59</IfModule>
60
61# Redirects so that basic URLs entered go the right place
62Redirect /fabric /fabric/onos/ui
63Redirect /vtn /vtn/onos/ui