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 (FastCGI).
The users start at a landing page named
index.html. 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. The webwallet.sh script 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 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 set up it is important to increase the timeouts that are set in the NGINX config. Add the following lines to your NGINX server config.:
In the PHP section of the NGINX server config you have to add the following line right below the line containing
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
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 and again change /var/www/html to the directory your webserver is using if it differs):
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.