These are chat archives for ushahidi/Community

24th
Mar 2016
Ushbot
@ushbot
Mar 24 2016 07:04
[Mariah, Ushahidi] Hello all,I need your help with my installation
[Angela Oduor Lungati, Ushahidi] Hi @MariahGuest what trouble are you having?
[Mariah, Ushahidi] I'm getting 404 in platform/httpdocs/
[Mariah, Ushahidi] Unable to find a route to match the uri: platform/httpdocs
[Angela Oduor Lungati, Ushahidi] pinging @Jason :). See ^^
[Mariah, Ushahidi] Kohana_http_exception
[Mariah, Ushahidi] @Jason
[Mariah, Ushahidi] I followed all instructions on installation guide page
[Jason Mule, Ushahidi] @Mariah Are you installing on Apache?
[Mariah, Ushahidi] Yes I am
[Jason Mule, Ushahidi] could you make platform/httpdocs the DocumentRoot?
[Mariah, Ushahidi] I changed base_URL in init.php to my IP address/platform/httpdocs
Ushbot
@ushbot
Mar 24 2016 07:09
[Mariah, Ushahidi] Can you give me tutorial how to do it?
[Mariah, Ushahidi] I'm not familiar with that
[Jason Mule, Ushahidi] What OS are you installing on?
[Mariah, Ushahidi] Windows
Ushbot
@ushbot
Mar 24 2016 07:23
[Jason Mule, Ushahidi] ok, it might be easier to create a virtual host and add the DocumentRoot there. You could use this guide specific to XAMPP on windows: http://foundationphp.com/tutorials/apache_vhosts.php

[Link, Ushahidi]

Virtual hosts on Apache in Windows

Instructions on how to set up virtual hosts in Apache on Windows, with special notes for XAMPP. Updated for Apache 2.4.

[Mariah, Ushahidi] I'm done thanks
[Mariah, Ushahidi] How can I see the admin log in?
[Mariah, Ushahidi] I now see a json response with endpoints
Ushbot
@ushbot
Mar 24 2016 07:30
[Mariah, Ushahidi] Also when I was trying to install the client, when I ran gulp build, I got this error : /usr/bin/env: node: no such file of directory
[Mariah, Ushahidi] I have already copied it
Ushbot
@ushbot
Mar 24 2016 08:00
[Jason Mule, Ushahidi] ok, so you need to install nodejs
Ushbot
@ushbot
Mar 24 2016 12:38
[Mariah, Ushahidi] Hi Again @Jason
[Mariah, Ushahidi] I just installed platform client
[Mariah, Ushahidi] and I'm getting this error msg: Sorry, something went wrong. Try reloading the page.
[Mariah, Ushahidi] I checked my api but I;m getting 404. Sample IP ADDRESS/api/v3/config
[Mariah, Ushahidi] Please help me
[Mariah, Ushahidi] I've been doing this installation for almost a week
[Mariah, Ushahidi] and I don't have any success yet
[Mariah, Ushahidi] When I checked my platform, it gives me this json response: {
"now": "2016-03-24T12:31:29+00:00",
"version": "3",
"endpoints": [
"collections",
"collections/posts",
"comments",
"config",
"contacts",
"csv",
"csv/import",
"dataproviders",
"forms",
"forms/attributes",
"forms/stages",
"layers",
"media",
"messages",
"notifications",
"passwordreset",
"permissions",
"posts",
"posts/geojson",
"posts/revisions",
"posts/translations",
"posts/updates",
"register",
"roles",
"savedsearches",
"tags",
"users"
],
"user": {
"id": null,
"email": null,
"realname": null
}
}
[Mariah, Ushahidi] but with api/v3/config it's empty 404
Ushbot
@ushbot
Mar 24 2016 12:53
[Jason Mule, Ushahidi] Sorry to hear. I am trying to reproduce your issue but without success. Did you successfully set up url rewrites?
[Jason Mule, Ushahidi] ...or customize the init settings as an alternative?
Ushbot
@ushbot
Mar 24 2016 13:00
[Jason Mule, Ushahidi] Also, are you running platform under a separate virtual host with platform/httpdocs as the the DocumentRoot. This is usually an easier.
Ushbot
@ushbot
Mar 24 2016 14:24
[Jason Mule, Ushahidi] s/an easier/easier/
Ushbot
@ushbot
Mar 24 2016 14:40
[Mariah, Ushahidi] HI @Jason
[Mariah, Ushahidi] Yes I successfully set up url rewrites
[Mariah, Ushahidi] I'm running platform in a separate server
[Mariah, Ushahidi] I have two servers
[Mariah, Ushahidi] for api and client
[Jason Mule, Ushahidi] are you running the api on a virtual host with the DocumentRoot pointed to platform/httpdocs?
[Mariah, Ushahidi] Yes
Ushbot
@ushbot
Mar 24 2016 14:45
[Mariah, Ushahidi] Note that I'm installing it on my vps not just on my local
[Jason Mule, Ushahidi] what OS is your VPS running on?
[Mariah, Ushahidi] Ubuntu
[Mariah, Ushahidi] for platform
[Mariah, Ushahidi] CentOS for client
[Mariah, Ushahidi] @Jason do you want me to send you the link to your email?
Ushbot
@ushbot
Mar 24 2016 14:50
[Jason Mule, Ushahidi] Could you check that you have your virtual host files in /etc/apache2/sites-enabled?

[Mariah, Ushahidi] @Jason here's my conf file: <VirtualHost \*:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin [webmaster@localhost](webmaster@localhost)
\# DocumentRoot /var/www/html
DocumentRoot /var/www/html/platform/httpdocs

\# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
\# error, crit, alert, emerg.
\# It is also possible to configure the loglevel for particular
\# modules, e.g.
\#LogLevel info [ssl:warn](ssl:warn)

ErrorLog ${APACHE\_LOG\_DIR}/error.log
CustomLog ${APACHE\_LOG\_DIR}/access.log combined

\# For most configuration files from conf-available/, which are
\# enabled or disabled at a global level, it is possible to
\# include a line for only one particular virtual host. For example the
\# following line enables the CGI configuration for this host only
\# after it has been globally disabled with "a2disconf".
\#Include conf-available/serve-cgi-bin.conf

</VirtualHost>

[Jason Mule, Ushahidi] I hope that this is one line # DocumentRoot /var/www/html commented out?
[Mariah, Ushahidi] @Jason yes that is commented out
[Mariah, Ushahidi] @Jason It's already working. As I said that it's giving json response. The problem is with the client
[Jason Mule, Ushahidi] aren't you getting a 404 when you access the config?
[Mariah, Ushahidi] Yes I am getting.
[Jason Mule, Ushahidi] You should also have something like:
[Jason Mule, Ushahidi] <Directory "/var/www/html/platform/httpdocs">
Require all granted
</Directory>
Ushbot
@ushbot
Mar 24 2016 14:56
[Mariah, Ushahidi] Wait I'll add it
[Jason Mule, Ushahidi] in the <Virtualhost\*:80>
[Mariah, Ushahidi] Okay I will add it
[Mariah, Ushahidi] I'
Ushbot
@ushbot
Mar 24 2016 15:01
[Mariah, Ushahidi] I'm getting error when I restart apache. AH00526: Syntax error on line 34 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command '\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82Require', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
[Jason Mule, Ushahidi] What version of apache?
[Mariah, Ushahidi] apache2
[Mariah, Ushahidi] wait

[Mariah, Ushahidi] This is now my new conf file: <Directory "/var/www/html/platform/httpdocs">
Require all granted
</Directory>

<VirtualHost \*:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
# DocumentRoot /var/www/html
DocumentRoot /var/www/html/platform/httpdocs

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

[Mariah, Ushahidi] And apache was restarted
[Jason Mule, Ushahidi] please add <Directory "/var/www/html/platform/httpdocs">
Require all granted
</Directory>
[Jason Mule, Ushahidi] inside <virtualhost>
Ushbot
@ushbot
Mar 24 2016 15:07
[Mariah, Ushahidi] Sorry I moved it inside virtualhost
[Mariah, Ushahidi] and then what's the next step for me?
[Jason Mule, Ushahidi] Does apache restart?
[Mariah, Ushahidi] Yes it does
[Jason Mule, Ushahidi] could you check if you are still getting a 404?
Ushbot
@ushbot
Mar 24 2016 15:12
[Mariah, Ushahidi] In IPAddress/api/v3/config?
[Jason Mule, Ushahidi] yes
[Mariah, Ushahidi] Yes I am still getting it
[Mariah, Ushahidi] this is the error msg: The requested URL /api/v3/config was not found on this server.
Ushbot
@ushbot
Mar 24 2016 15:21
[Jason Mule, Ushahidi] could you try this instead
[Jason Mule, Ushahidi] <Directory "/var/www/httpdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
[Mariah, Ushahidi] I'm getting error again
[Mariah, Ushahidi]
Output of config test was:
AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command '\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82AllowOverride', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
[Jason Mule, Ushahidi] sorry this <Directory "/var/www/httpdocs"> should be <Directory "/var/www/html/platform/httpdocs">
[Mariah, Ushahidi] Yes I changed it
[Mariah, Ushahidi] I'm getting error on line 17 which is AllowOverride All
Ushbot
@ushbot
Mar 24 2016 15:27
[Jason Mule, Ushahidi] what's the error?
[Mariah, Ushahidi] Output of config test was:
AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command '\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82AllowOverride', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
[Jason Mule, Ushahidi] and at some point, did you run sudo a2enmod rewrite?
[Mariah, Ushahidi] not yet
[Mariah, Ushahidi] because of the error
Ushbot
@ushbot
Mar 24 2016 15:36
[Jason Mule, Ushahidi] for url rewrites to work, you need to run sudo a2enmod rewrite
[Jason Mule, Ushahidi] the command enables the rewrite module
[Mariah, Ushahidi] I reverted my conf to run apache again
[Mariah, Ushahidi] I run a2enmod rewrite
[Mariah, Ushahidi] and it works
[Mariah, Ushahidi] now I add <Directory "/var/www/html/platform/httpdocs">
Options Indexes FollowSymLinks
    AllowOverride All
Require all granted
</Directory> and it's still getting the error
[Jason Mule, Ushahidi] Invalid command?
[Mariah, Ushahidi] 11:29 PM
Output of config test was:
AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command '\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82AllowOverride', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
Ushbot
@ushbot
Mar 24 2016 15:44
[Jason Mule, Ushahidi] could you remove the white space before AllowOverride and check?
[Mariah, Ushahidi] still the same
Ushbot
@ushbot
Mar 24 2016 15:50
[Jason Mule, Ushahidi] brb
[Mariah, Ushahidi] Hope you can help me
[Mariah, Ushahidi] @Jason okay
[Mariah, Ushahidi] @Jason hey I removed white space and it's now working~!
[Mariah, Ushahidi] @Jason but I cannot see the login page
Ushbot
@ushbot
Mar 24 2016 15:55
[Mariah, Ushahidi] Says here: Logging in the first time
The default install creates a user admin with password admin. Once logged in this user can create further user accounts or give others admin permissions too.
Ushbot
@ushbot
Mar 24 2016 16:12
[Mariah, Ushahidi] @Jason Also I think I also have problem with my platform-client in the conf file
[Mariah, Ushahidi] this is hosted on CentOS (different server from API)
Ushbot
@ushbot
Mar 24 2016 16:44
[Jason Mule, Ushahidi] What error are you seeing?
[Mariah, Ushahidi] Wait, for my client it's on CentOS server. In this server I have my website and client
[Mariah, Ushahidi] Here's the structure: var/www/html/index.html <- My landing page
[Mariah, Ushahidi] var/www/html/platform-client <- client
[Mariah, Ushahidi] I modified the httpd.conf

[Mariah, Ushahidi] And added this at the end : <VirtualHost \*:80>

ServerAdmin [webmaster@localhost](webmaster@localhost)
DocumentRoot /var/www/html/platform-client/server/www

<Directory "/var/www/html/platform-client/server/www">
    AllowOverride All
</Directory>

</VirtualHost>

Ushbot
@ushbot
Mar 24 2016 16:54
[Jason Mule, Ushahidi] And are you seeing any errors?
[Mariah, Ushahidi] No
[Jason Mule, Ushahidi] What page are you seeing?
[Mariah, Ushahidi] I'm seeing the page with Add Post and Log In Sign Up
[Mariah, Ushahidi] but I inspect element
Ushbot
@ushbot
Mar 24 2016 17:00
[Jason Mule, Ushahidi] npm install and gulp build run without an error?
[Mariah, Ushahidi] It has an error

[Mariah, Ushahidi] [root@impactumbrella platform-client]# gulp build
[13:00:52] Using gulpfile /var/www/html/platform-client/gulpfile.js
[13:00:52] Starting 'copy-leaflet-icons'...
[13:00:52] Starting 'css'...
[13:00:52] Starting 'font'...
[13:00:52] Starting 'browserify'...
[13:00:52] Finished 'css' after 38 ms
[13:00:52] Finished 'font' after 36 ms
[13:00:53] Finished 'copy-leaflet-icons' after 334 ms
[13:00:53] Starting 'rename'...
[13:00:53] Finished 'rename' after 6.58 μs
[13:00:53] Starting 'sass'...
[13:00:53] gulp-notify: [Gulp notification] CSS compiled
[13:00:53] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:26020): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[13:00:53] gulp-notify: [Gulp notification] CSS compiled
[13:00:53] Finished 'sass' after 484 ms
[13:00:53] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:26023): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[Mariah, Ushahidi] When I check my main domain it's no longer displaying the landing page, but the platform-client
[Mariah, Ushahidi] I think I have something wrong with httpd.conf
Ushbot
@ushbot
Mar 24 2016 17:08
[Jason Mule, Ushahidi] I think you need to install libnotify but I am not sure what the package is in CentOS
[Mariah, Ushahidi] how do I install libnotify?
[Jason Mule, Ushahidi] could you try yum search libnotify
[Jason Mule, Ushahidi] well just run notify-send "test" for starters
[Mariah, Ushahidi] Oh sorry libnotify is already installed
[Mariah, Ushahidi] I'm getting this persistent error:
(notify-send:26094): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Ushbot
@ushbot
Mar 24 2016 17:14
[Jason Mule, Ushahidi] ok, so gulp build seems to have completed?
[Mariah, Ushahidi] Yes but with that error msg again
[Jason Mule, Ushahidi] have you tried to log in with the default admin credentials?
[Mariah, Ushahidi] every time I run gulp build I get the error
[Mariah, Ushahidi] @Jason as admin (email add) and password?
[Mariah, Ushahidi] @Jason if this is what you mean, yes I have tried
[Jason Mule, Ushahidi] Can you login?
[Mariah, Ushahidi] Yes I can log in
Ushbot
@ushbot
Mar 24 2016 17:27
[Jason Mule, Ushahidi] the glib error is probably because notify-send is running from a non-graphical environment but gulp build shouldn't be affected.
[Jason Mule, Ushahidi] I think you have installed the platform and platform-client now?
[Mariah, Ushahidi] Yes I have installed them
[Mariah, Ushahidi] but I have warnings on platform-client when I inspect element
[Mariah, Ushahidi] I even posted here ^^
[Mariah, Ushahidi] try to scroll up to see my console logs I posted above
Ushbot
@ushbot
Mar 24 2016 17:48
[Jason Mule, Ushahidi] apart from the warnings, are you able to use the platform?
[Mariah, Ushahidi] Yes
[Mariah, Ushahidi] but I can't view my main site's landing page
[Mariah, Ushahidi] it's just displaying the platform-client
Ushbot
@ushbot
Mar 24 2016 17:54
[Jason Mule, Ushahidi] ok, I think you replaced your apache configs? There are ways to configure multiple virtual hosts. You can check out https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts for a guide.

[Link, Ushahidi]

How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS | DigitalOcean

The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called 'virtual hosts'. If a virtual host is configured correctly for each d

[Mariah, Ushahidi] Can you check this?

[Mariah, Ushahidi] <VirtualHost \*:80>

ServerAdmin [webmaster@localhost](webmaster@localhost)
DocumentRoot /var/www/html/platform-client/server/www

<Directory "/var/www/html/platform-client/server/www">
    AllowOverride All
</Directory>

</VirtualHost>

[Link, Ushahidi]

core - Apache HTTP Server Version 2.2

Modules | Directives | FAQ | Glossary | Sitemap

Ushbot
@ushbot
Mar 24 2016 17:59
[Jason Mule, Ushahidi] could you use the guide and configure your virtual hosts separately? That way you can enable and disable them for easier troubleshooting?
Ushbot
@ushbot
Mar 24 2016 18:08
[Mariah, Ushahidi] okay hold on
[Jason Mule, Ushahidi] just be careful so that you can roll back your changes when things don't work :-)
[Mariah, Ushahidi] Okay. When I try to separate vhosts I'm not getting again the correct platform-client

[Mariah, Ushahidi]
Ushahidi Logo

Sorry, something went wrong. Try reloading the page.

Ushbot
@ushbot
Mar 24 2016 18:13

[Mariah, Ushahidi] Tried this: NameVirtualHost \*:80

<VirtualHost \*:80>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/
ServerName www.example.com

</VirtualHost>

<VirtualHost \*:80>

ServerAdmin webmaster@example.com
DocumentRoot /var/www/html/platform-client/server/www
ServerName www.example.com/platform-client/server/www

<Directory "/var/www/html/platform-client/server/www">
AllowOverride All
</Directory>

</VirtualHost>

Ushbot
@ushbot
Mar 24 2016 18:30
[Jason Mule, Ushahidi] Sorry, it might be difficult for me to troubleshoot your apache configs since I don't have access to your environment. Could you revert to the working config and do it in steps using the guide?
Ushbot
@ushbot
Mar 24 2016 18:38
[Mariah, Ushahidi] Okay I will

[Mariah, Ushahidi] I tried this: NameVirtualHost *:80

<VirtualHost \*:80>

ServerAdmin webmaster@localhost
ServerAlias example.com
DocumentRoot /var/www/html/
ServerName www.example.com

</VirtualHost>

<VirtualHost \*:80>

ServerAdmin webmaster@example.com
ServerAlias example.com/platform-client/server/www
DocumentRoot /var/www/html/platform-client/server/www
ServerName www.example.com/platform-client/server/www

<Directory "/var/www/html/platform-client/server/www">
AllowOverride All
</Directory>

</VirtualHost>

[Mariah, Ushahidi] But assets in platform are directly linking from example.com/css instead of example.com/platform-client/server/www/css