mirror of
https://github.com/librespeed/speedtest.git
synced 2026-05-13 16:26:38 +00:00
Page:
Reverse proxy with Apache
Pages
Alternative backends
Browser support
CentOS 8 installation guide
Contributing
Home
Implementation details
Installation (Go)
Installation (Node.js)
Installation (PHP)
Installation (PHP with Docker)
Installation
Making a custom front end
Multiple test points (PHP)
Nginx vHost for PHP version
No backend
Reverse proxy with Apache
Reverse proxy with Nginx
Troubleshooting, common problems, known limitations
Using PM2 to keep the Node Server running
Using prebuilt NodeJS Binaries
backend files
results files
speedtest.js
speedtest_worker.js
No results
4
Reverse proxy with Apache
Perflyst edited this page 2020-03-10 13:28:40 +01:00
To expose the locally running service to the internet you need to configure a reverse proxy. Depending on how you run the service (Docker, Go binary) you need to change the port in the config below.
You also need to obtain a SSL certificate from for example Let's Encrypt with certbot.
IPv4 and IPv6 is intentionally separate, otherwise it is not possible to forward the IPv6 address from the client to the backend.
If you do not have IPv6 please remove the IPv6 blocks from the virtual host below.
# IPv4 plain HTTP
<VirtualHost Your.Public.IPv4.Address:80>
ServerName librespeed.example.org
ProxyRequests Off
ProxyPreserveHost On
ErrorLog /dev/null
CustomLog /dev/null combined
<Location />
ProxyPass http://127.0.0.1:<port>/
ProxyPassReverse http://127.0.0.1:<port>/
</Location>
</VirtualHost>
# IPv6 plain HTTP
<VirtualHost [Your:Public:IPv6::Address]:80>
ServerName librespeed.example.org
ProxyRequests Off
ProxyPreserveHost On
ErrorLog /dev/null
CustomLog /dev/null combined
<Location />
ProxyPass http://[::]:<port>/
ProxyPassReverse http://[::]:<port>/
</Location>
</VirtualHost>
# IPv4 encrypted HTTPS
<VirtualHost Your.Public.IPv4.Address:443>
ServerName librespeed.example.org
Protocols h2 h2c http/1.1
ProxyRequests Off
ProxyPreserveHost On
ErrorLog /dev/null
CustomLog /dev/null combined
SSLEngine On
SSLCertificateFile /path/to/fullchain.pem
SSLCertificateKeyFile /path/to/privkey.pem
SSLCertificateChainFile /path/to/chain.pem
<Location />
ProxyPass http://127.0.0.1:<port>/
ProxyPassReverse http://127.0.0.1:<port>/
</Location>
</VirtualHost>
# IPv6 encrypted HTTPS
<VirtualHost [Your:Public:IPv6::Address]:443>
ServerName librespeed.example.org
Protocols h2 h2c http/1.1
ProxyRequests Off
ProxyPreserveHost On
ErrorLog /dev/null
CustomLog /dev/null combined
SSLEngine On
SSLCertificateFile /path/to/fullchain.pem
SSLCertificateKeyFile /path/to/privkey.pem
SSLCertificateChainFile /path/to/chain.pem
<Location />
ProxyPass http://[::]:<port>/
ProxyPassReverse http://[::]:<port>/
</Location>
</VirtualHost>