Openspeedtest Swag Nginx configuration file

Hello friends, nice to join the forum.
I’m a new UnRAID user and I’m not a programmer.
I’ve watched a few youtube and read many blog and forum articles about configuring a reverse proxy to handle SSL cerificates, and I ended up installing Swag for it’s ease of use :slight_smile:
However, there are a few services samples missing from Swag’s nginx/proxy-conf folder.
One of them is the Openspeedtest docker app.
I managed to install Openspeedtest’s Unraid commnity app, and I’m able to use it within my home network, but I was not able to configure Swag to work with it to create an SSL certificate, so I can’t use Openspeedtest from external IP’s with my website URL.
Can anyone please help me convert Openspeedtest’s proposed Nginx conf file to a version that would work with Swag?

This is the conf file they listed on their nginx github page:

    # ©CopyRight 2013-2022 by OpenSpeedTest.COM. All Rights Reserved. 
    # Official Website : https://OpenSpeedTest.COM | Email:
    # Developed by : Vishnu | https://Vishnu.Pro | Email : 
    # HTML5 Network Performance Estimation Tool -> [JS,XHR,SVG,HTML,CSS]
    # Started in 2011 and Moved to OpenSpeedTest.COM Dedicated Project/Domain Name in 2013.
    # SpeedTest Script -> 2013 -> Beta | 2015 -> V1 | 2019 ->V2 | 2020 V2.1 | 2021 V2.12.

    # Self-Hosted OpenSpeedTest-Server (iFrame/Nginx) -> 2014.
    # OpenSpeedTest-Server (On-premises)
    # [Docker] -> V1 2019 | V2 2020 | V2.1 2021
    # [Node.js/Electron JS] -> 2020 V1 | 2021 V2 & V2.1
    # Download ->

    # Like this Project? Please Donate NOW & Keep us Alive ->

    # Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
    # Read full license terms @
    # If you have any Questions, ideas or Comments Please Send it via ->

server {
server_name _ localhost;
        listen 3000;
        listen 3001 ssl; # HTTP2 Disabled because of Performance issues.
        # If you like to Ebable HTTP2 add "http2" to the above line.
        # If HTTP2 Enabled Upload location should Proxy_Pass to http port.
        # Otherwise you will see abnormal Upload Speeds.
        # Nginx Server Windows SSL Performance was very poor! Better use Linux if you need SSL support.
        ssl_certificate  /etc/ssl/nginx.crt; # Use your own certificate & key
        ssl_certificate_key /etc/ssl/nginx.key; # <-- key
        ssl_ciphers         EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
        ssl_protocols       TLSv1.1 TLSv1.2;
        ssl_session_cache   shared:SSL:10m;
        ssl_session_timeout 10m;
        root /usr/share/nginx/html/;
        index index.html;
        client_max_body_size 10000M;
        error_page  405     =200 $uri;
        access_log off;
        gzip off; 
        fastcgi_read_timeout 999;
        log_not_found  off;
        server_tokens off;
        error_log /dev/null; #Disable this for Windows Nginx.
        tcp_nodelay on;
        tcp_nopush on;
        sendfile on;
        open_file_cache max=200000 inactive=20s;
        open_file_cache_valid 30s;
        open_file_cache_min_uses 2;
        open_file_cache_errors off;
        location / {
            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;
            #Very Very Important! You SHOULD send no-store from server for Google Chrome.
            add_header Cache-Control 'no-store, no-cache, max-age=0, no-transform';
            add_header Last-Modified $date_gmt;
                if_modified_since off;
                expires off;
                etag off;

            if ($request_method = OPTIONS ) {
            add_header Access-Control-Allow-Credentials "true";
            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-Origin' "$http_origin" always;        
            add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
            return 204;

        # IF and Only if you Enabled HTTP2 otherwise never enable the following 
        #location = /upload {
        # HTTP2 will return 200 withot waiting for upload to complete. it's smart but we don't need that to happen here when testing upload speed on HTTP2.    

 #Caching for Static Files,
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|woff2|svg)$ {
    access_log off;
    expires 365d;
    add_header Cache-Control public;
    add_header Vary Accept-Encoding;
    tcp_nodelay off;
    open_file_cache max=3000 inactive=120s;
    open_file_cache_valid 45s;
    open_file_cache_min_uses 2;
    open_file_cache_errors off;
    gzip on; 
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
# Make this Nginx conf. Better? Send me you ideas ->