-
Notifications
You must be signed in to change notification settings - Fork 1
1. Website Installation
- Recommended OS for Server: Ubuntu 14.04 or Ubuntu 16.04
- Install Backend Package
- Install Frontend Package
- Apache2 Setting
- Https Certificate
- Localization
- Reference: https://www.ushahidi.com/support/install-ushahidi#installing-on-linux
- Steps:
- Install PHP 5.6, Composer, Apache2, Mysql 5.5
- Go to /var/www
cd /var/www
- Copy backend package from Ushahidi's Github
sudo git clone https://github.com/ushahidi/platform.git
- Build a database on Mysql
mysql -u root -p
create database ushahidi_db;
grant all on ushahidi_db.* to ushahidi@localhost identified by ‘password’;
quit;
- create a file ".env"
cd platform
sudo vim .env
DB_HOST=localhost
DB_NAME=ushahidi_db
DB_TYPE=MySQLi
DB_USER=ushahidi
DB_PASS=password
- Set up URL rewrites
cd httpdocs
sudo cp template.htaccess .htaccess
- Enable writing to the logs, cache, and upload directories
chmod 0777 application/logs application/cache application/media/uploads
or
chmod 0777 application/logs application/cache application/media/uploads
chown www-data application/logs application/cache application/media/uploads
- Installing dependencies
sudo bin/update
- Reference: https://www.ushahidi.com/support/install-ushahidi#installing-on-linux
- Steps:
- Install NodeJS
- Go to /var/www
cd /var/www
- Copy frontend package from Ushahidi's Github
sudo git clone https://github.com/ushahidi/platform-client.git
- Install Build Requirements
cd platform-client
sudo npm install -g gulp
- Install Packages
sudo npm install
- Create file ".env"
sudo vim .env
BACKEND_URL=http://backendurl.com
- Run gulp
sudo gulp build
- Steps:
- Go to Apache2 folder
cd /etc/apache2/sites-available
- Create a configuration file
sudo vim ushahidi.conf
<VirtualHost *:8080>
ServerName servername.com
DocumentRoot "/var/www/platform/httpdocs"
<Directory "/var/www/platform/httpdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName servername.com
DocumentRoot "/var/www/platform-client/server/www"
<Directory "/var/www/platform-client/server/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- Enable sites
sudo a2ensite ushahidi.conf
- Restart Apache2
sudo service apache2 restart
- Reference:
- Create SSL Certificate on Apache2
https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04 - Create a Certificate Robot
https://certbot.eff.org/#ubuntutrusty-apache
- Steps:
- Go to Apache2 folder
cd /etc/apache2
- Edit file "port.conf"
sudo nano port.conf
<IfModule ssl_module>
Listen 443
Listen 8443
</IfModule>
- Create a configuration file
cd /etc/apache2/sites-available
sudo vim ushahidi-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin serveradmin@gmail.com
ServerName servername.com
DocumentRoot /var/www/platform-client/server/www
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/ies-tser.iis.sinica.ed$
SSLCertificateKeyFile /etc/letsencrypt/live/ies-tser.iis.sinica$
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/ies-tser.iis.sini$
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/var/www/platform-client/server/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
<VirtualHost _default_:8443>
ServerAdmin serveradmin@gmail.com
ServerName servername.com
DocumentRoot /var/www/platform/httpdocs
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/ies-tser.iis.sinica.ed$
SSLCertificateKeyFile /etc/letsencrypt/live/ies-tser.iis.sinica$
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/ies-tser.iis.sini$
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/var/www/platform/httpdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
- Enable sites
sudo a2ensite ushahidi-ssl.conf
- Restart Apache2
sudo service apache2 restart
- Follow reference 1 to apply a Https certification
- Follow reference 2 to build a certification robot
./certbot-auto
-
Reference:
https://www.ushahidi.com/support/translations - Steps:
- Create a .transifexrc file in "home/user". Make sure that the account you are using has joined the Ushahidi v3 group on Transifex.
cd /home/user
sudo nano .transifexrc
[https://www.transifex.com]
username = transifex_account
token =
password = transifex_password
hostname = https://www.transifex.com
- Run gulp build. You might have to try multiple times if there is a socket hang up error.
sudo gulp build
- The option for Language should show up on the client site.