NGINX COD4 Server Fast download

Hello,
I add custom mod on my server.
But mu fastdl don’t work.
"seta sv_wwwDownload “1” // enable download redirection
seta sv_wwwBaseURL “mydomain” // defines url to download from
set sv_allowdownload “1”
seta sv_wwwDlDisconnected “0"”

Server is on NGINX any tips?

wwwbaseurl is complete like this
set sv_wwwbaseurl “http://www.xxxx.com” i x ed out my domain but I think it should give you the idea

i have no idea if the seta you use will work or not

all of mine use set not seta
set sv_allowdownload “1”
set sv_wwwDownload “1”
set sv_wwwbaseurl “http://www.xxxx.com” (domain x ed out for post
set sv_wwwDlDisconnected “0”
set dedicated “2” // 0 = Listen, 1 = LAN, 2 = Internet ( you probably want 2 )

Your maps must be placed into the usermaps folder…

Example:
www.yourdomain.com points to “/var/www”
your maps should be in “/var/www/usermaps” and mod files should be in “/var/www/mods”

thanks I forgot to mention that.

Is your NGINX server block (vhost) ok? That would be the first place to look now as your server.cfg looks ok.

Did you sudo nano /etc/hosts (assuming you are on linux) and add the domain details and restart NGINX.

Is the vhost in sites available and sites enabled?

All tips to check.

Here is my fastdl nginx conf:

server {
    listen 80;
    listen [::]:80;

    server_name <your.domain.here>;
    root <your/cod4/root/directory/here>;

    location / {
        # try to serve file directly, fallback to front controller
	deny all;
    }

    location ~* "\.(ff|iwd)$" {
        # Just allow the .ff and .iwd files to download from the server
	allow all;
    }

    #location ~ "/$" {
        # This setting you can browse the files in the browser, I turned off.
	#autoindex on; 
    #}

    error_log /var/log/nginx/fastdl_error.log;
    access_log /var/log/nginx/fastdl_access.log;
}

You might need to adjust some permissions on the cod4 directory to be able to work, but should work.
Modify the relevant fields what need to be, and test it.

1 Like

This is brilliant! How have I never thought of this…damn. I shall be using this…thank you!

1 Like

Okay, I have right now in .cfg file this:

set sv_wwwDownload "1" // enable download redirection
set sv_wwwBaseURL "http://xxxxxx.pl/cod4" // defines url to download from
set sv_allowdownload "1"
set sv_wwwDlDisconnected "0"

And this on vhost config:

location ~ /cod4 {
    allow all;
  } 
  
  location ~* "\.(ff|iwd)$" {
        # Just allow the .ff and .iwd files to download from the server
	allow all;
  }

But still doesn’t work :frowning:
And when i go in http link i’ve got 404 error.

Your root probably misconfigured in your nginx.conf
It has to be set accordingly, you cannot use the same root, use different config.