Speed-Test icon indicating copy to clipboard operation
Speed-Test copied to clipboard

deploy to subpath URL

Open pianotako opened this issue 2 years ago • 2 comments

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 @@

pianotako avatar Jun 28 '23 04:06 pianotako

You have two options: upload the speedtest files to a subdirectory or use proxy pass.

openspeedtest avatar Jun 29 '23 11:06 openspeedtest

Finally, I made it by proxy pass.

pianotako avatar Oct 04 '23 03:10 pianotako