Home Forums WoodMart support forum Header intermittently missing

Header intermittently missing

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #599854

    josh-6874
    Participant

    I noticed that the header goes missing for undefined reasons and the only way to restore it is to delete NGINX FastCGI cache which is currently in use.
    Please review my NGINX configurations and advise a possible solution:

    fastcgi_cache_path /var/cache/nginx/fastcgi_temp/ levels=1:2 keys_zone=ZONE_1:200m max_size=10g inactive=60m use_temp_path=off;
    fastcgi_cache_key "$scheme$request_method$host$request_uri";
    fastcgi_cache_use_stale error timeout invalid_header http_500;
    fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
    
    server {
    	listen 443 ssl ;
    	http2 on ;
    	listen [::]:443 ssl ;
    	server_name jmic.co.kr www.jmic.co.kr; # managed by Certbot
    	#server_name wordpress.example.com;
    	ssl_certificate /etc/letsencrypt/live/www.jmic.co.kr/fullchain.pem; # managed by Certbot
    	ssl_certificate_key /etc/letsencrypt/live/www.jmic.co.kr/privkey.pem; # managed by Certbot
    
    	root /var/www/html/;
    	index index.php;
    
    	# set max upload size
    	client_max_body_size 2G;
    	fastcgi_buffers 64 4K;
    
    	access_log /var/log/nginx/wordpress_https_access.log combined;
    	error_log /var/log/nginx/wordpress_https_error.log;
    
    	#gzip on;
    	#gzip_types text/plain text/css text/javascript image/svg+xml image/x-icon application/javascript application/x-javascript;
    	#gzip_min_length 1000;
    	#gzip_vary on;
    	#gzip_proxied no-cache no-store private expired auth;
    	#gzip_disable MSIE [1-6];
    
    	server_tokens off;
    
     	# START FastCGI
    	# POST requests and urls with a query string should always go to PHP
    	if ($request_method = POST) {
    	    set $skip_cache 1;
    	}
    	
    	if ($request_method = PATCH) {
    	set $no_cache 1;
    	}
    	
    	if ($query_string != "") {
    	    set $skip_cache 1;
    	}   
    	
    	# Don't cache uris containing the following segments
    	if ($request_uri ~* "/위시리스트/|/장바구니/|/결제/|/내-계정/|/wishlist/|/my-cart/|/checkout/|/my-account/|/wp-admin/|/xmlrpc.php|wp-.*.php|^/feed/*|/tag/.*/feed/*|index.php|/.*sitemap.*\.(xml|xsl)") {
    	    set $skip_cache 1;
    	}   
    	
    	# Don't use the cache for logged in users or recent commenters
    	if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
    	    set $skip_cache 1;
    	}
    	# END FastCGI
    
    	# BEGIN CompressX
    	set $ext_avif ".avif";
    	if ($http_accept !~* "image/avif") {
    	  set $ext_avif "";
    	}
    
    	set $ext_webp ".webp";
    	if ($http_accept !~* "image/webp") {
    	  set $ext_webp "";
    	}
    
    	location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|gif|webp|png)$ {
    	  add_header Vary Accept;
    	  add_header Cache-Control "private";
    	  expires 365d;
    	  try_files
    	      /wp-content/compressx-nextgen/$path.$ext$ext_avif
    	      /wp-content/compressx-nextgen/$path.$ext$ext_webp
    	      $uri = 404;
    	}
    	# END CompressX
    
    	##
    	# BEGIN Nginx Bad Bot Blocker Includes
    	# REPO: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
    	##
    
    	include /etc/nginx/bots.d/ddos.conf; 
     	include /etc/nginx/bots.d/blockbots.conf;
     	# END Nginx Bad Bot Blocker Includes
    
    	include /etc/nginx/site-extras/*.conf;
    
    	location = /favicon.ico {
    		log_not_found off;
    		access_log off;
    	}
    
    	location = /robots.txt {
    		allow all;
    		log_not_found off;
    		access_log off;
    	}
    
    	location / {
    		try_files $uri $uri/ /index.php?$args ;
    	}
    
    	location ~* \.(htaccess|htpasswd) {
    		deny all;
    	}
    
    	location ~* \.(?:ini|conf|txt)$ {
    		deny all;
    	}
    
    	location ~ \.php(?:$|/) {
    		fastcgi_split_path_info ^(.+\.php)(/.+)$;
    		include fastcgi_params;
    		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    		fastcgi_param PATH_INFO $fastcgi_path_info;
    		fastcgi_param HTTPS on;
    		fastcgi_pass 127.0.0.1:9000;
    		fastcgi_read_timeout 60s;
    
    		# START FastCGI configurations
    		fastcgi_cache ZONE_1;		
    		fastcgi_cache_valid 200 301 302 60m;
    		fastcgi_cache_valid 404 30s; 
    		fastcgi_buffers 16 16k;
    		fastcgi_buffer_size 32k;
    		fastcgi_keep_conn on;
    		fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_503;
    		fastcgi_cache_min_uses 1;
    		fastcgi_cache_lock on;
    		fastcgi_cache_bypass $skip_cache;
    		fastcgi_no_cache $skip_cache;
    		add_header X-FastCGI-Cache $upstream_cache_status;
    		# END FastCGI configurations
    	}
    
    	## START SEOPress sitemap location
    	location ~ (([^/]*)sitemap(.*)|news|author|video(.*))\.x(m|s)l$ {
    		rewrite ^.*/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
    		rewrite ^.*/news.xml$ /index.php?seopress_news=1 last;
    		rewrite ^.*/video([0-9]+)?.xml$ /index.php?seopress_video=1&seopress_paged=$1 last;
    		rewrite ^.*/author.xml$ /index.php?seopress_author=1 last;
    		rewrite ^.*/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
    		rewrite ^.*/sitemaps_video_xsl\.xsl$ /index.php?seopress_sitemap_video_xsl=1 last;
    		rewrite ^.*/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?seopress_cpt=$1&seopress_paged=$2 last;
    	}
    	## END SEOPress sitemap location
    
    	#START Staging Site SSL location
    	location /dev {
    		# First attempt to serve request as file, then
    		# as directory, then fall back to displaying a 404,
    		#try_files $uri $uri/ = 404;
    		try_files $uri $uri/ /dev/index.php?$args;
    	}
    	#END Staging Site SSL location
    
    	# set long EXPIRES header on static assets
    	location ~* ^.+\.(?:css|js|swf)$ {
    		expires 30d;
    		access_log off;
    	}
    
    }
    #599868

    Artem Temos
    Keymaster

    Hello,

    Please disable any plugins not directly related to our theme and provide us with your admin access details. We will log in to your dashboard and investigate the issue. Please ensure that you only keep the following plugins that are necessary for our theme to work correctly:
    – WoodMart core
    – WooCommerce
    – Elementor/WPBakery Page Builder

    Thank you in advance.

Viewing 2 posts - 1 through 2 (of 2 total)