HOW TO SET UP THE WEBWALLET
This thread is about how you can set up the webwallet. The webwallet is a safe and easy built solution to provide access to the wallet via a webpage. It was developed and tested on a setup with nginx and php-fpm.
From a technical point of view the users start at a landing page named index.html
served by nginx. The users credentials are send via POST method to the script wallet.php
which runs on the server side. The script itself then calls a shell script named webwallet.sh
that acts as a connector between the wallet client and the webserver. It manages the sessions and triggers the calls of ucs_client.sh
, catches the output and builds a webpage for the user based on that data. The script basically outputs a stream of html code to STDOUT that is then forwarded to the webserver.
STEP 1 : HAVE A RUNNING NGINX WITH PHP-FPM SETUP
Once you have a working nginx and php-fpm set up it is important to increase the timeouts that are set in the NGINX config. Add the following lines inside the server block (server {
) of your NGINX config.:
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
In the php block (location ~ \.php$
) of the NGINX config you have to add the following line right below the line containing fastcgi_pass
:
fastcgi_read_timeout 300s;
These timeout values can be different, but keep in mind that depending on your hardware it could take some minutes for the script to calculate everything. So to avoid getting a server timeout we suggest to set this value to few minutes. You also have to make sure that the user under which PHP is running has writeaccess to the wallets home directory because files are uploaded into this folder.
STEP 2 : EXTRACT THE SOURCES
Step into the wallet home directory and unpack webwallet_home.tar
:
tar -xvf webwallet_home.tar
After that extract the file webwallet_www-data.tar
. The target folder that is used in below command is your webservers directory (/var/www/html
). If your webserver uses a different directory you have to change the path after ‘-C’ option to the one that your webserver is using (make sure you have write permissions for this directory ! If you don’t have these permissions use sudo
in front of this command):
tar -xvf webwallet_www-data.tar -C /var/www/html
STEP 3 : RUN THE INSTALL SCRIPT
Now run the installer script (the user that runs this scirpt must have write access to the webservers content directory e.g. /var/www/html so you may used sudo
in front. Also change /var/www/html to your needs if your webserver is using a different directory):
sudo ./install_webwallet.sh /var/www/html
STEP 4 : START NGINX AND PHP-FPM
Start nginx and php-fpm and you should be able to access the webwallet via browser.