, (*1)
These tools are happy working at https://ca.rles-tub.io./tools., (*2)
, (*3)
Login to your desired machine, mkdir something under /var/www
and compose the tools with the following commands (Composer is required):, (*4)
$ cd /var/www
$ mkdir your.domain.name
$ cd your.domain.name
$ composer create-project ctubio/www-toolbox . --keep-vcs
- portscan
- dnscheck
- poolsign
Single webserver setup
just define a virtual host as usual. Drop the files to a subpath if you like to keep your current DocumentRoot, or make use of /pub/www-toolbox.php
as Index for the DocumentRoot., (*5)
Multiple webservers setup
if you dont like to use a load balancer, configure the main server (lets say 10.10.10.2 [may be your main webserver]) to reverse proxy all request from /tools
(or any other path that you like) to the DocumentRoot of the secondary server (10.10.10.21 [may be a server dedicated only* for serve the tools]):, (*6)
at 10.10.10.2 (main webserver):
setup the reverse proxy editing the following configuration files:, (*7)
/etc/hosts
10.10.10.21 www-toolbox
nginx: /etc/nginx/sites-available/your.domain.name
location /tools {
rewrite ^/tools(/.*)$ $1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://www-toolbox:80/;
proxy_read_timeout 90;
}
apache2: /etc/apache2/sites-available/your.domain.name
ProxyVia On
ProxyPass /tools http://www-toolbox
ProxyPassReverse /tools http://www-toolbox
ProxyPassMatch /tools(.*) http://www-toolbox$1
at 10.10.10.21 (secondary webserver):
just define a virtual host as usual but named www-toolbox
(or any other name that you defined previously) with the Index of the DocumentRoot at /pub/www-toolbox.php
., (*8)
in pub/www-toolbox.php
instead of:, (*9)
echo new WWWToolbox(
WWWToolbox::ALL_TOOLS
);
add your list of enabled tools:, (*10)
echo new WWWToolbox(array(
'dnscheck',
'sslcheck',
'portscan'
));
This will enable only the urls /dnscheck
, /sslcheck
and /portscan
.
(or depending your configs may result in /tools/dnscheck
, /tools/sslcheck
and /tools/portscan
, or may result in any other prefix that you make use instead of /tools
as your subpath/reverse proxy)., (*11)
Alternatively, you may customize the urls:, (*12)
echo new WWWToolbox(array(
'custom_dnscheck' => 'dnscheck',
'custom_sslcheck' => 'sslcheck',
'custom_portscan' => 'portscan'
));
This will enable the urls /custom_dnscheck
(for the tool dnscheck
) and so on., (*13)
Customize the layout (or any other template)
Please copy the distributed file and feel free to modify anything, because /skin/*.lex
files are ignored by git:, (*14)
$ cd skin
$ cp layout.lex.dist layout.lex
$ vim layout.lex
Very special thanks to:
- https://github.com/c9s/Pux
- https://github.com/pyrocms/lex
* may be also dedicated to run some other totally useful secondary apps, ofcourse., (*15)