Web Analytics
How can I Auto download Mp3 on nginx server - StoreFront Forums

How can I Auto download Mp3 on nginx server

Solution
Nginx doesn't support .htaccess. The code you provided requires .htaccess.

What you should do is to convert the .htaccess code and add it to nginx.conf, commonly found at /etc/nginx/nginx.conf or /etc/nginx/sites-available/default or a similar location depending on your server setup).

Example

NGINX:
location ~* \.(zip|mp3|mp4|wav|pdf)$ {
    add_header Content-Disposition "attachment";
    default_type application/octet-stream;
}

Pedro

Forum Admin
Staff member
Trusted Uploader
Contributor
Aug 21, 2021
1,631
3
2,508
113
Genesis Forum
storefront.com.ng
N-Token
₮140,495.63
Nginx doesn't support .htaccess. The code you provided requires .htaccess.

What you should do is to convert the .htaccess code and add it to nginx.conf, commonly found at /etc/nginx/nginx.conf or /etc/nginx/sites-available/default or a similar location depending on your server setup).

Example

NGINX:
location ~* \.(zip|mp3|mp4|wav|pdf)$ {
    add_header Content-Disposition "attachment";
    default_type application/octet-stream;
}
 
Last edited:
Solution

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)

Forum statistics

Threads
1,090
Messages
6,588
Members
3,459
Latest member
ugbonepaul
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock    No Thanks