Skip to content

Commit

Permalink
Fix apache configuration proxy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyShaanan committed Dec 7, 2017
1 parent dc5cf57 commit 79a4c25
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 155 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CloudFlow",
"version": "0.3.0",
"version": "0.3.1",
"license": "Apache-2.0",
"scripts": {
"ng": "ng",
Expand All @@ -15,15 +15,15 @@
},
"private": true,
"dependencies": {
"@angular/animations": "5.0.5",
"@angular/common": "5.0.5",
"@angular/compiler": "5.0.5",
"@angular/core": "5.0.5",
"@angular/forms": "5.0.5",
"@angular/http": "5.0.5",
"@angular/platform-browser": "5.0.5",
"@angular/platform-browser-dynamic": "5.0.5",
"@angular/router": "5.0.5",
"@angular/animations": "5.1.0",
"@angular/common": "5.1.0",
"@angular/compiler": "5.1.0",
"@angular/core": "5.1.0",
"@angular/forms": "5.1.0",
"@angular/http": "5.1.0",
"@angular/platform-browser": "5.1.0",
"@angular/platform-browser-dynamic": "5.1.0",
"@angular/router": "5.1.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0-beta.6",
"angular-oauth2-oidc": "^3.0.0",
"angular-split": "1.0.0-rc.0",
Expand All @@ -46,9 +46,9 @@
"zone.js": "^0.8.16"
},
"devDependencies": {
"@angular/cli": "1.5.5",
"@angular/compiler-cli": "5.0.5",
"@angular/language-service": "5.0.5",
"@angular/cli": "1.6.0",
"@angular/compiler-cli": "5.1.0",
"@angular/language-service": "5.1.0",
"@types/codemirror": "^0.0.43",
"@types/dagre": "0.7.36",
"@types/jasmine": "~2.5.53",
Expand All @@ -68,6 +68,6 @@
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.8.0",
"typescript": "~2.4.0"
"typescript": "~2.5.3"
}
}
12 changes: 10 additions & 2 deletions scripts/cloudflow.apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
## sudo a2enmod proxy
## sudo a2enmod proxy_http
## sudo a2enmod headers
## sudo a2enmod ssl
##
## For Mac users to enable modules you need to open the main config usually
## located at /etc/apache2/httpd.conf and uncomment corresponding lines
Expand All @@ -28,6 +29,7 @@ Listen 8000

# to enable https, uncomment the following lines, and point to your cert and key files
#SSLEngine On
#SSLProxyEngine On
#SSLCertificateFile /etc/apache2/ssl/apache-selfsigned.crt
#SSLCertificateKeyFile /etc/apache2/ssl/apache-selfsigned.key

Expand All @@ -36,8 +38,14 @@ Listen 8000
RewriteEngine On

# Redirect all /api/... requests to mistral instance
ProxyPass "/api/" "%{REQUEST_SCHEME}://localhost:8989/v2/"
ProxyPassReverse "/api/" "%{REQUEST_SCHEME}://localhost:8989/v2/"
RewriteCond %{HTTPS} =off
RewriteRule . - [E=protocol:http]
RewriteCond %{HTTPS} =on
RewriteRule . - [E=protocol:https]

RewriteRule ^/api/(.*) %{ENV:protocol}://localhost:8989/v2/$1 [P]
ProxyPassReverse "/api/" "http://localhost:8989/v2/"
ProxyPassReverse "/api/" "https://localhost:8989/v2/"

<Directory /opt/CloudFlow/dist>
DirectoryIndex index.html
Expand Down
2 changes: 1 addition & 1 deletion src/app/about/about.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title">
<img src="assets/icon256.svg" height="32" width="32" class="mr-2" />
CloudFlow <small class="text-muted">v0.3.0</small>
CloudFlow <small class="text-muted">v0.3.1</small>
</h4>
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('')">
<span aria-hidden="true">&times;</span>
Expand Down
Loading

0 comments on commit 79a4c25

Please sign in to comment.