apache config for new GUI

Change-Id: I7e5cba872deb086359f3b650f4fc5bbb115e2b92
diff --git a/mcord/non-xos-config/cord-http.conf b/mcord/non-xos-config/cord-http.conf
new file mode 100644
index 0000000..f5354b0
--- /dev/null
+++ b/mcord/non-xos-config/cord-http.conf
@@ -0,0 +1,84 @@
+<IfModule proxy_module>
+    ProxyPreserveHost on
+
+    # Map /fabric to the onos instance that is controlling the leaf
+    #     spine fabric
+    <Location /fabric/>
+        ProxyPass http://onos-fabric:8181/
+        ProxyPassReverse http://onos-fabric:8181/
+        ProxyPassReverseCookiePath  "/"  "/fabric/"
+        Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/fabric$2"
+    </Location>
+
+    <Location /fabric/onos/ui/websock/>
+        ProxyPass "ws://onos-fabric:8181/onos/ui/websock/" disablereuse=on
+    </Location>
+
+    # Map /vtn to the onos instance that is controller the cordvtn
+    #     application
+    <Location /vtn/>
+        ProxyPass http://onos-cord:8182/
+        ProxyPassReverse http://onos-cord:8182/
+        ProxyPassReverseCookiePath  "/"  "/vtn/"
+        Header edit Location "(^http[s]?://[^/]*)(\.*)" "$1/vtn$2"
+    </Location>
+
+    <Location /vtn/onos/ui/websock/>
+        ProxyPass "ws://onos-cord:8182/onos/ui/websock/" disablereuse=on
+    </Location>
+
+    # Map the various XOS roots to the XOS instance
+    ProxyPass /xos http://xos:8888
+    ProxyPass /spa/api http://xos:3000/api
+    ProxyPass /xos/ http://xos:8888/
+    ProxyPassMatch /(api)$ http://xos:8888/$1/
+    ProxyPass /api/ http://xos:8888/api/
+    ProxyPass /login http://xos:8888/login
+    ProxyPass /admin/ http://xos:8888/admin/
+    ProxyPass /static/ http://xos:8888/static/
+    ProxyPass /loggedin/ http://xos:8888/loggedin/
+    ProxyPass /serviceGrid/ http://xos:8888/serviceGrid/
+
+
+    # Cord SPA and rest-gw
+   ProxyPass /spa http://xos:4000
+   ProxyPass /spa/api http://xos:3000/api
+   ProxyPass /spa/socket.io http://xos:3000/socket.io
+   ProxyPass /socket.io http://xos:3000/socket.io
+   
+   ProxyPass /viv/ http://salty-interest:8081/
+   ProxyPass /viv http://salty-interest:8081
+   ProxyPass /telem http://salty-interest:8081/telem
+   ProxyPass /telemReset http://salty-interest:8081/telemReset
+
+   # ProxyPass /cookies/api http://10.6.0.153:8000/api
+   <LocationMatch "/cookies/api">
+       ProxyPass http://10.6.0.142:8000/api
+       Header set "Access-Control-Allow-Origin" "*"
+       Header set "Access-Control-Allow-Methods" "POST, GET, OPTIONS, DELETE, PUT"
+       Header set "Access-Control-Allow-Headers" "x-sessionid, x-csrftoken, Content-Type"
+   </LocationMatch>
+   <LocationMatch "/spa/cookies/api">
+       ProxyPass http://10.6.0.142:8000/api
+       Header set "Access-Control-Allow-Origin" "*"
+       Header set "Access-Control-Allow-Methods" "POST, GET, OPTIONS, DELETE, PUT"
+       Header set "Access-Control-Allow-Headers" "x-sessionid, x-csrftoken, Content-Type"
+   </LocationMatch>
+   <Location /socket.io>
+       RewriteEngine on
+       RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
+       RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
+       RewriteRule .* ws://xos:3000%{REQUEST_URI} [P]
+   </Location>
+
+</IfModule>
+
+<IfModule rewrite_module>
+    RewriteEngine On
+    # Redirect (permanently) requests for /MAAS to /MAAS/.
+    RewriteRule ^/MAAS$ %{REQUEST_URI}/ [R=301,L]
+</IfModule>
+
+# Redirects so that basic URLs entered go the right place
+Redirect /fabric /fabric/onos/ui
+Redirect /vtn /vtn/onos/ui