Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ worker_processes auto;
events {
use epoll; # Efficient event-driven model for Linux
multi_accept on; # Accept multiple new connections at once
worker_connections 1024; # Max simultaneous connections per worker
}

####### HTTP MODULE ########
Expand All @@ -20,7 +21,7 @@ http {

####### PERFORMANCE & BUFFER SETTINGS ########
fastcgi_buffer_size 512k; # FastCGI buffer size
fastcgi_busy_buffers_size 512k; # FastCGI busy buffer size
fastcgi_busy_buffers_size 1024k; # FastCGI busy buffer size
fastcgi_buffers 16 512k; # Number of FastCGI buffers

server_names_hash_bucket_size 128;
Expand Down Expand Up @@ -74,6 +75,7 @@ http {
application/x-javascript text/xml
application/xml application/xml+rss
text/javascript text/js
application/json
application/javascript;
gzip_static on; # Use pre-compressed .gz files if available

Expand Down Expand Up @@ -144,10 +146,14 @@ http {
}

# 3. Cookie-based exclusions
# Skips cache for Wordpress.
# Skips cache for Wordpress + WoodMart.
map $http_cookie $skip_cache_cookie {
default 0;
~*(comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in) 1;

# WoodMart — support
~*woodmart_wishlist_count=[1-9] 1;
~*woodmart_compare_list=%5B%22 1;
}

# Skips cache for WooCommerce.
Expand Down
Loading