Quantcast
Channel: EasyEngine Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 12639

Best Nginx configuration for EDD?

$
0
0

@ayothemes

We don't have a blog write up for EDD plugin right now.

For protecting your EDD product files on Nginx. Add the following config under server{} block /etc/nginx/sites-available/example.com

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

You can skip page cache for logged-in users by adding/updating the following code under /etc/nginx/common/redis-php7.conf OR /etc/nginx/common/redis.conf

I am assuming you are using Redis page cache.

# Don't use the cache for logged in users or recent commenter
if ($http_cookie ~* "edd_items_in_cart|comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
  set $skip_cache 1;
}

Viewing all articles
Browse latest Browse all 12639

Trending Articles