My server is Nginx
How to solve this error?
Sorry, something went wrong. Try reloading the page.
Ushahidi Client
Ushahidi API
My server is Nginx
How to solve this error?
Sorry, something went wrong. Try reloading the page.
Ushahidi Client
Ushahidi API
Hi there,
It looks like you haven’t got the rewrite rules set up on the API. If you look at http://ushahidi.dev.agnian.com/api/v2/config you can see its giving a 404, where it should be returning a JSON response.
Did you set up the htaccess file for the API?
Hi Robbie,
Should I set up htaccess?
My server is Nginx, I think htaccess for Apache?
Am I right?
Also should be v3 not v2 in http://ushahidi.dev.agnian.com/api/v3/config
ah right so htaccess won’t help on nginx.
Here’s a nginx config I’ve used elsewhere… try taking bits from this:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/ushahidi/httpdocs;
index index.php;
# Make site accessible from http://localhost/
server_name hostname.com;
client_max_body_size 10M;
location / {
try_files $uri $uri/ /index.php$uri?$args;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ^~ /index.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
break;
}
}