These are chat archives for ushahidi/Community

Nov 2017
Nov 27 2017 13:33
[saheleasy] Hello
I need your, am using ushahidi on my own server its working fine but when i trying add the deployment on the mobile app it wont work.
I need you help i try add the config.json file but it wont fix the problem so can you help me please
Nov 27 2017 15:11
[Romina Suarez, Ushahidi] Hi .
  1. Is your config.json configured with the correct API info?
  2. is your CORS setup correct? ( See CORS HEADERS section )
Nov 27 2017 15:20
[saheleasy] I install the cors headers in config.json file but its not working

[saheleasy] The bakend_url

Lets say my ip server

And its pointed to domain:

The backend

Is this write ??

Please i try almost everything

[saheleasy] Please help me i looked everywhere but didnt find the answer
Nov 27 2017 15:29
[Romina Suarez, Ushahidi] OK. So, first thing to check: CORS has to be handled in your web server configuration, NOT in your config.json. Make sure that when you call your API you see those headers in the http requests (ie , if you are in chrome, open your network panel and verify the headers that you get from the server)
[Romina Suarez, Ushahidi] also, what’s the error that you get in the mobile app?
Nov 27 2017 15:34
[saheleasy] I get this error it was the default error before i create the config file
[saheleasy] All what i have is ssh account of my ubuntu server
[Romina Suarez, Ushahidi] right. is your domain, right?
[saheleasy] Yes
[saheleasy] Its the same of that ip
[saheleasy] Get the same error
[saheleasy] U can visit the deployment its work fine
[Romina Suarez, Ushahidi] @saheleasy when I check the config.json there, It’s not correctly configured. And you also need to setup the CORS headers correctly.
BACKEND_URL is pointing to , and the CORS headers are not there as far as I can see
Nov 27 2017 15:39
[Romina Suarez, Ushahidi] also, it should be backend_url but your file says “backend_domain"

[saheleasy] I try to hired developers from freelancer but nothing help

Ok can you tell me how to add cors headers in my server ubuntu using ssh client ?

[saheleasy] Ahha
[saheleasy] Is this the right place for the config.file ??
[Romina Suarez, Ushahidi] it’ll depend on your webserver configuration basically. But you can check if it’s accesible/its contents / headers etc by running
`curl -vvv` in your (local) cli
[saheleasy] I try it and i get this ?
[saheleasy] Is it right ?
Nov 27 2017 15:54
[Romina Suarez, Ushahidi] yes, that’s correct (you are getting the file and the headers output there)
[Romina Suarez, Ushahidi] the file and headers are still wrong but that’d allow you to debug it
[saheleasy] So how to fix it and make it right ??
Romina Suarez
Nov 27 2017 16:11
@saheleasy: please change your root credentials now. This is a public forum. :/
Nov 27 2017 16:12
[saheleasy] Ok
[saheleasy] Still need the help
[saheleasy] I change it
Is any one can help me
Romina Suarez
Nov 27 2017 16:23
You should read the guide again here and try to follow the steps.
  1. Setup the URL correctly in config.json (that would be , I believe)
  2. Setup the CORS headers in your web server.
    ------- Since you are in ubuntu with apache 2.4x, you should follow the guide from ushahidi then run apachectl -t to make sure the configuration is OK, and then if that's ok, reload the server configuration with sudo service apache2 reload )
    ---- This is very dependant on your specific server setup , but in general you should be able to add them in the file where you have setup your apache server to run the API .
Nov 27 2017 16:27
[saheleasy] I think my problems with cross headrs