Short article on a rather uncommon need, a web based calculator!
The justbrowsing-calculator is a calculator supporting most of basic needs for a calculator (addition, substraction, multiplication, division, power, square root).
Forked from HTML5Calculator, the design is rather standard but works like a charm and is damn easy to install!
The best is still to give it a try.
Although I’m not sure how useful it is, it’s an interesting application.
So here is how to install the justbrowsing calculator.
1) Install git (if not available)
On top of a LAMP server, you will also need git as we are going to directly clone the project’s repo. In root, simply run:
apt-get install git
2) Clone the repo in your /var/www
cd /var/www git clone https://github.com/justbrowsing/justbrowsing-calculator
and that’s all!!
You can now access to your online calculator on http://YourIP/justbrowsing-calculator
Most probably, you may want to set up a sub domain or domain to easily access to your web-based calculator. Like calc.freedif.org
What you will need:
1) Create a A redirection in your DNS server/registrar with calc.domain.tld to your IP
2) Create your virtualhost as following:
In /etc/apache2/sites-enabled/, create a file called justbrowsing-calculator (In root):
and paste/modify the following content:
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org ServerName calc.domain.tld DocumentRoot /var/www/justbrowsing-calculator <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/justbrowsing-calculator> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost>
Adapt the content (Servername, webmaster’s mail and directory).
When done, save the file (CTRL+X then Yes) and reload apache: (In root)
Now your good to go!