Speed-Test
Speed-Test copied to clipboard
deploy to subpath URL
Is it possible to deploy openspeedtest in subpath URL? For example, I have an URL like https://my-example.com And I want to deploy it at https://my-example.com/speedtest/
I try to modifiy nginx config, but it not work. Is there any suggestion?
/etc/nginx/conf.d/OpenSpeedTest-Server.conf
@@ -45,8 +45,9 @@
break;
}
- location / {
-
+ location /speedtest/ {
+ alias /usr/share/nginx/html/;
+
add_header 'Access-Control-Allow-Origin' "*" always;
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
@@ -101,4 +102,4 @@
You have two options: upload the speedtest files to a subdirectory or use proxy pass.
Finally, I made it by proxy pass.