From 8ec897f06715fab02249a88387b6499a013a9dee Mon Sep 17 00:00:00 2001 From: Caio SBA Date: Fri, 22 May 2015 13:41:12 -0300 Subject: [PATCH] Adding Apache configuration file that sets a reverse proxy between the webserver and Noosfero API, so the mobile app and the backend can communicate on a safe way --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index 2fd8bed..87f001f 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,21 @@ This application is built on top of Ionic, so you need this framework. In order to compile the theme, you need to run: `gulp sass` You need to configure the application by creating a file `www/js/config.js` based on `www/js/config.js.example`. + +## Connecting to Noosfero + +One way to connect with Noosfero API is to set the `Access-Control-Allow-Origin` header on the Noosfero side and thus allow connections. + +Another way is to set a reverse proxy on a webserver in front of Noosfero. For example, let's assume there is +a host called `confjuv`. If you have the following Apache configuration for this site, you can access the front-end +by going to http://confjuv/www and any other request path will be forwarded to Noosfero running on `localhost:3000`: + +```apache + + ServerName confjuv + DocumentRoot /var/www/confjuvapp # This is the ConfJuvApp directory inside this repository + ProxyPass /www ! + ProxyPass / http://localhost:3000/ + ProxyPassReverse / http://localhost:3000/ + +``` -- libgit2 0.21.2