pcfe's blog

Speedtest.net Mini on Your Own Box

sometimes I need a quick and dirty speed test of an internet connection. Speedtest.net Mini allows just that, but I did not want random surfers to eat my bandwith. So here’s how to set up your own.

On RHEL5/CentOS5

  • download the zip file
  • mkdir /var/www/speedtest-mini
  • unpack in there
  • cp index-php.html index.html
  • chown -R apache.apache /var/www/speedtest-mini
  • create /etc/httpd/conf.d/speedtest-mini.conf with this content
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# This configuration file restricts access to speedtest-mini
# http://httpd.apache.org/docs/current/howto/htaccess.html
# 

Alias /speedtest-mini /var/www/speedtest-mini

<directory "/var/www/speedtest-mini">
    Options Indexes
    AllowOverride AuthConfig
    AuthType Basic
    AuthName "Password Required"
    AuthUserFile /var/www/speedtest-mini.passwords
    Require valid-user
</directory>
  • htpasswd -c /var/www/speedtest-mini.passwords speedtest
  • restart apache
  • Access as http://yourserver.example.com/speedtest-mini