Maak een nieuwe jail en wijzig onder advanced settings alleen de gateway.
Connect met Putty naar de FreeNAS
jls jexec # csh
mkdir /usr/local/www cd /usr/local/www curl -O http://cdn.speedtest.speedtest.net/netgauge/OoklaServer.tgz gunzip OoklaServer.tgz tar xf OoklaServer.tar mv FreeBSD Speedtest cd Speedtest cp OoklaServer.properties.default OoklaServer.properties vi OoklaServer.properties
uncomment the following:
OoklaServer.allowedDomains = *.ookla.com, *.speedtest.net :wq
curl -O http://install.speedtest.net/ooklaserver/ooklaserver.sh chmod a+x OoklaServer chmod a+x OoklaServer.properties chmod a+x ooklaserver.sh vi /etc/rc.local
i /usr/local/www/Speedtest/OoklaServer --daemon :wq chmod a+x /etc/rc.local /etc/rc.local
pkg install lighttpd pkg install php5-extensions echo 'lighttpd_enable="YES"' >> /etc/rc.conf
vi /usr/local/etc/lighttpd/lighttpd.conf
Edit the following:
var.server_root = "/usr/local/www/Speedtest/speedtest" server.use-ipv6 = "disable" server.bind = "192.168.178.6" server.document-root = "/usr/local/www/Speedtest/speedtest" $SERVER["socket"] == "192.168.178.6:80"
curl -O http://cdn.speedtest.speedtest.net/http_legacy_fallback.zip unzip http_legacy_fallback.zip cd speedtest
vi crossdomain.xml i <cross-domain-policy> <allow-access-from domain="*.ookla.com" /> <allow-access-from domain="*.speedtest.net" /> </cross-domain-policy>
:wq
Enable fast-cgi module by removing #:
vi /usr/local/etc/lighttpd/modules.conf
#include "conf.d/fastcgi.conf"
Edit fastcgi.conf:
vi /usr/local/etc/lighttpd/conf.d/fastcgi.conf
fastcgi.server = ( ".php" =>
((
"socket" => "/tmp/php.socket",
"bin-path" => "/usr/local/bin/php-cgi",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "16",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"min-procs" => 1,
"max-procs" => 1,
"idle-timeout" => 20
))
)Test the Lighthttpd config:
lighttpd -t -f /usr/local/etc/lighttpd/lighttpd.conf
Start Ligthttpd
/usr/local/etc/rc.d/lighttpd start