• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

GridPane

  • How it Works
    • Creating Servers
    • Creating Websites
  • Use Cases
  • Pricing
  • Knowledge Base
  • More
    • FAQ
    • Apollo
    • Comparisons
    • Updates
  • Login
  • Free Trial
GridPane >Knowledge Base > Protecting files in Easy Digital Downloads on GridPane

Protecting files in Easy Digital Downloads on GridPane

Steve B
Updated on 31st August 2020

2 min read
Third-Party Software NoticeOur support team cannot provide support for third-party software and services. However, if you spot an issue with this article please let us know and we will endeavor to bring it up-to-date ASAP.

When using Easy Digital Downloads on Nginx you’ll get a notification inside your website that says: –

—

The download files in /var/www/site.url/htdocs/wp-content/uploads/edd are not currently protected due to your site running on NGINX.

To protect them, you must add a redirect rule as explained in this guide.

If you have already added the redirect rule, you may safely dismiss this notice

https://docs.easydigitaldownloads.com/article/682-protected-download-files-on-nginx

—

To do this, you first need to SSH into your server. Please see the following articles to get started:

Generate your SSH Key:

Generate SSH Key on Mac

Generate SSH Key on Windows with Putty

Generate SSH Key on Windows with Windows Subsystem for Linux

Generate SSH Key on Windows with Windows CMD/PowerShell

Add your SSH Key to GridPane:

Add default SSH Keys

Add/Remove an SSH Key to/from an Active GridPane Server

Connect to your server:

Connect to a GridPane server by SSH as Root user.

Step 1. Create a file named edd-main-context.conf

First, begin by creating the edd-main-context.conf file, replacing “site.url” with your domain name:

nano /var/www/site.url/nginx/edd-main-context.conf

Step 2. Add this to the contents to the file

location ~ ^/wp-content/uploads/edd/(.*?).zip$ { rewrite / permanent; }

rewrite ^/wp-content/uploads/edd/(.*).zip$ / permanent;

Save the file with CTRL+O, and then Enter. Exit nano with CTRL+X.

Step 3. Check the syntax of nginx.conf

nginx -t

If, after entering the above command, you see a message letting you know that everything’s OK:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

You can now you can reload Nginx by running

gp ngx reload

Your Easy Digital Download files will now be protected.

Primary Sidebar

Search the Knowledge Base

  • Provisioning Servers
  • Managing Servers
  • Managing Websites
  • SSL Certificates
  • Server Caching
  • Migrating to GridPane
  • Plugins / Services
  • Security
  • Performance
  • SMTP / Email
  • FAQ
  • Policies

Footer

Quick Links
  • Documentation
  • Status
  • Roadmap
  • Comparisons
  • Updates
  • Facebook Group
Connect With Us
  • (619) 4-SERVER
  • info@gridpane.com
Facebook-f
Twitter
Youtube

GridPane is the world’s first hosting control panel purpose-built for Serious WordPress Practitioners

© Copyright 2017-2021 – GridPane – Run WordPress the Right Way

Terms of Service – Privacy Policy – GDPR
Built with ❤ by S Bell
  • How it Works
    • Creating Servers
    • Creating Websites
  • Use Cases
  • Pricing
  • Knowledge Base
  • More
    • FAQ
    • Apollo
    • Comparisons
    • Updates
  • Login
  • Free Trial