COMO MONTA SERVIDOR DE SPEEDTEST
Após hospeda e so aguarda o ookla fazer a analise.
Portas:
– TCP/UDP 8080 (OoklaServer)
– TCP/UDP 5060 (OoklaServer)
– TCP 80 (HTTP Legacy)
Todas as portas devem estar abertas para qualquer IP público da Internet, pois os usuários se conectarão diretamente.
Pacotes necessários
# apt install wget unzip apt-transport-https
Vamos cria o diretório dentro de /etc
cd /etc/
mkdir speedtest
cd /etc/speedtest
# wget https://install.speedtest.net/ooklaserver/ooklaserver.sh --no-check-certificate
chmod +x ooklaserver.sh
./ooklaserver.sh install
Prervidor Web
Precisamos ter um serviço web rodando e PHP, para isso vamos instalar o Apache2 + PHP7
Agora vamos instala apache2
# apt install apache2 libapache2-mod-php php
nano /etc/apache2/sites-available/teste.conf
<virtualhost *:80>
ServerName teste.meudominio.com.br
ServerAdmin noc@email.com.br
DocumentRoot /var/www/teste
<directory /var/www/teste/ >
Options FollowSymLinks
AllowOverride All
</directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/error_teste.log
CustomLog ${APACHE_LOG_DIR}/access_teste.log combined
</virtualhost>
agora vamos configura a centificação ssl
# apt install letsencrypt python-certbot-apache
agora vamos para o apache
# systemctl stop apache2
letsencrypt --authenticator standalone --installer apache -d teste.dominio.com.br
apos coloque seu seu email que foi configurado no apache
em seguido .
digite A
apos N
apos 1
agora vamos configurar OoklaServer.properties.
nano /etc/speedtest/OoklaServer.properties
# OoklaServer.allowedDomains = *.ookla.com, *.speedtest.net
# altere ¬
OoklaServer.allowedDomains = *.ookla.com, *.speedtest.net, *.SEUDOMINIO.com.br
# ...
# openSSL.server.certificateFile = cert.pem
# openSSL.server.privateKeyFile = key.pem
# altere ¬
openSSL.server.certificateFile = /etc/letsencrypt/live/teste.SEUDOMINIO.com.br/fullchain.pem
openSSL.server.privateKeyFile = /etc/letsencrypt/live/teste.SEUDOMINIO.com.br/privkey.pem
OoklaServer.useIPv6 = true
agora faça uma copia
# cp /etc/speedtest/OoklaServer.properties /etc/speedtest/OoklaServer.properties.default
feito isso vamos configura os pacote dentro do apache
cd /var/www/html
vamos lá
# wget http://install.speedtest.net/httplegacy/http_legacy_fallback.zip
# unzip http_legacy_fallback.zip
# rm http_legacy_fallback.zip -f
# mv /var/www/html/speedtest/* /var/www/html/
# rm /var/www/html/speedtest/ -rf
# rm *.asp *.aspx *.jsp
aqui adicione seu dominio
# nano /var/www/html/crossdomain.xml
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*.speedtest.net" />
<allow-access-from domain="*.ookla.com" />
<allow-access-from domain="*.meudominio.com" />
</cross-domain-policy>
feito todo o passo a passo
vamos teste dessa forma
entre nesse site
APÓS O TESTE ELE FICANDO TODO VERDE QUE DIZER QUE ESTA TUDO CORRE É SÓ HOSPEDA SEU SERVIDOR.
0 Comentários