{"id":1924,"date":"2025-09-08T18:58:21","date_gmt":"2025-09-08T16:58:21","guid":{"rendered":"https:\/\/olvy.net\/blog\/?p=1924"},"modified":"2025-11-24T10:42:55","modified_gmt":"2025-11-24T09:42:55","slug":"how-to-fix-nginx-cache-purge-on-debian12","status":"publish","type":"post","link":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/","title":{"rendered":"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1877 aligncenter\" src=\"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png\" alt=\"Olvy Cache Purger (Purge Nginx FastCGI Cache)\" width=\"700\" height=\"366\" srcset=\"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png 700w, https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger-300x157.png 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\r\n<p>When running NGINX with caching on Debian 12, you may discover that cache purging doesn\u2019t work if your PHP-FPM pool runs under a <strong>custom system user<\/strong> instead of the default <code><span style=\"font-size: 12pt;\">www-data<\/span><\/code>. This problem becomes very real in <strong>multi-tenant environments<\/strong> or whenever you separate applications into isolated users for security.<\/p>\r\n<p><span style=\"color: #008000;\"><em>UPDATE: You may encounter a similar issue in Ubuntu 24.04 and Debian 13. The solution described below also applies to these OS versions. However, you should take into account the specific configurations and package versions of Ubuntu 24.04 and Debian 13.<\/em><\/span><\/p>\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#the_problem_purge_fails_with_default_setup\" >The Problem: Purge Fails with Default Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#before_you_begin\" >Before You Begin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#the_solution_build_the_cache_purge_module_from_source\" >The Solution: Build the Cache Purge Module from Source<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#1_enable_source_repositories\" >1. Enable Source Repositories<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#2_install_build_dependencies\" >2. Install Build Dependencies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#3_fetch_the_nginx_source\" >3. Fetch the NGINX Source<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#4_download_the_purge_module\" >4. Download the Purge Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#5_build_the_module\" >5. Build the Module<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#6_install_and_enable_the_module\" >6. Install and Enable the Module<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#why_this_matters\" >Why This Matters<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"the_problem_purge_fails_with_default_setup\"><\/span><strong>The Problem: Purge Fails with Default Setup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>By default, Debian\u2019s packaged NGINX plus the <code><span style=\"font-size: 12pt;\">ngx_http_cache_purge<\/span><\/code> module cannot properly purge cache entries if your PHP-FPM is not running as <span style=\"font-size: 12pt;\">www-data<\/span>. The reason is simple:<\/p>\r\n<ul>\r\n<li>The NGINX cache directory (e.g., <code><span style=\"font-size: 12pt;\">\/var\/cache\/nginx\/<\/span><\/code>) belongs to <span style=\"font-size: 12pt;\">www-data<\/span>.<\/li>\r\n<li>Purge requests routed via PHP-FPM running as another user (say <span style=\"font-size: 12pt;\">myusername<\/span>) cannot remove cache files, because of a permissions mismatch.<\/li>\r\n<li>The purge appears to \u201cfail silently\u201d &#8211; often returning <code><span style=\"font-size: 12pt;\">404 Not Found<\/span><\/code> instead of actually deleting cache entries.<\/li>\r\n<\/ul>\r\n<p>In short: if your PHP-FPM pools run under custom users (a best practice), the stock Debian module just won\u2019t cut it.<\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"before_you_begin\"><\/span><strong>Before You Begin<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>This guide assumes that you already have <strong>NGINX installed and configured with a working cache<\/strong> (e.g. using <code><span style=\"font-size: 12pt;\">proxy_cache_path<\/span><\/code> or <code><span style=\"font-size: 12pt;\">fastcgi_cache_path<\/span><\/code>). The steps below focus only on adding purge functionality, so we won\u2019t cover the initial cache configuration itself. If your NGINX is already caching responses successfully, you\u2019re ready to proceed with building and enabling the purge module.<\/p>\r\n<h2><span class=\"ez-toc-section\" id=\"the_solution_build_the_cache_purge_module_from_source\"><\/span><strong>The Solution: Build the Cache Purge Module from Source<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Debian provides official source packages that make it straightforward to rebuild additional modules. This ensures your compiled <code><span style=\"font-size: 12pt;\">ngx_http_cache_purge_module<\/span><\/code> matches the exact NGINX version and build flags shipped with Debian 12.<\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"1_enable_source_repositories\"><\/span><strong>1. Enable Source Repositories<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>Make sure <code><span style=\"font-size: 12pt;\">\/etc\/apt\/sources.list<\/span><\/code> includes <span style=\"font-size: 12pt;\">deb-src<\/span> entries. For Debian 12 (Bookworm), you should have lines like:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">deb http:\/\/deb.debian.org\/debian bookworm main<\/span>\r\n<span style=\"font-size: 12pt;\">deb-src http:\/\/deb.debian.org\/debian bookworm main<\/span>\r\n\r\n<span style=\"font-size: 12pt;\">deb http:\/\/deb.debian.org\/debian bookworm-updates main<\/span>\r\n<span style=\"font-size: 12pt;\">deb-src http:\/\/deb.debian.org\/debian bookworm-updates main<\/span>\r\n\r\n<span style=\"font-size: 12pt;\">deb http:\/\/security.debian.org\/debian-security bookworm-security main<\/span>\r\n<span style=\"font-size: 12pt;\">deb-src http:\/\/security.debian.org\/debian-security bookworm-security main<\/span><\/pre>\r\n<p>Update your package lists:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">apt update<\/span><\/pre>\r\n<h3><span class=\"ez-toc-section\" id=\"2_install_build_dependencies\"><\/span><strong>2. Install Build Dependencies<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>You\u2019ll need development tools and the dependencies required to compile NGINX:<\/p>\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">apt install dpkg-dev build-essential libpcre3-dev libssl-dev zlib1g-dev libxml2-dev libxslt1-dev libgd-dev libgeoip-dev libperl-dev<\/span><\/pre>\r\n<h3><span class=\"ez-toc-section\" id=\"3_fetch_the_nginx_source\"><\/span><strong>3. Fetch the NGINX Source<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>Download the NGINX source package:<\/p>\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">apt source nginx<\/span><\/pre>\r\n<p>This will create a directory like <code><span style=\"font-size: 12pt;\">nginx-1.22.1\/<\/span><\/code> in your current working folder.<\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"4_download_the_purge_module\"><\/span><strong>4. Download the Purge Module<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>Get the module source from GitHub:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">wget https:\/\/github.com\/torden\/ngx_cache_purge\/archive\/refs\/tags\/v2.3.1.tar.gz<\/span><\/pre>\r\n<p>Unpack the module sources:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">tar xzf v2.3.1.tar.gz<\/span><\/pre>\r\n<h3><span class=\"ez-toc-section\" id=\"5_build_the_module\"><\/span><strong>5. Build the Module<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>Go into the unpacked NGINX source directory and re-run the configure step with the same flags Debian uses, adding the purge module:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">cd nginx-1.22.1<\/span><\/pre>\r\n<pre class=\"wp-block-preformatted\"><span style=\"font-size: 12pt;\">.\/configure --add-dynamic-module=..\/ngx_cache_purge-2.3.1 --with-cc-opt='-g -O2 -ffile-prefix-map=\/build\/nginx-nduIyd\/nginx-1.22.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -fPIC' --prefix=\/usr\/share\/nginx --conf-path=\/etc\/nginx\/nginx.conf --http-log-path=\/var\/log\/nginx\/access.log --error-log-path=stderr --lock-path=\/var\/lock\/nginx.lock --pid-path=\/run\/nginx.pid --modules-path=\/usr\/lib\/nginx\/modules --http-client-body-temp-path=\/var\/lib\/nginx\/body --http-fastcgi-temp-path=\/var\/lib\/nginx\/fastcgi --http-proxy-temp-path=\/var\/lib\/nginx\/proxy --http-scgi-temp-path=\/var\/lib\/nginx\/scgi --http-uwsgi-temp-path=\/var\/lib\/nginx\/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-mail_ssl_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-http_geoip_module=dynamic --with-http_image_filter_module=dynamic --with-http_perl_module=dynamic --with-http_xslt_module=dynamic --with-mail=dynamic --with-stream=dynamic --with-stream_geoip_module=dynamic<\/span><\/pre>\r\n<p>When finished, you should have:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">objs\/ngx_http_cache_purge_module_custom.so<\/span><\/pre>\r\n<h3><span class=\"ez-toc-section\" id=\"6_install_and_enable_the_module\"><\/span><strong>6. Install and Enable the Module<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p><strong>(a)<\/strong> Copy the compiled .so module to any Debian 12 machine with NGINX 1.22.1 installed, into the Debian modules directory, like:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">\/usr\/lib\/nginx\/modules\/ngx_http_cache_purge_module_custom.so<\/span><\/pre>\r\n<p><strong>(b)<\/strong> Create configuration file:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">\/etc\/nginx\/modules-available\/50-mod-http-cache-purge-custom.conf<\/span><\/pre>\r\n<p>With content:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">load_module modules\/ngx_http_cache_purge_module_custom.so;<\/span><\/pre>\r\n<p><strong>(c)<\/strong> Remove (&#8220;disable&#8221;) the symbolic link to the configuration file that loads the default <code><span style=\"font-size: 12pt;\">ngx_http_cache_purge_module.so<\/span><\/code> in <code><span style=\"font-size: 12pt;\">\/etc\/nginx\/modules-enabled\/<\/span><\/code> to avoid loading the default and custom modules at the same time:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">rm \/etc\/nginx\/modules-enabled\/50-mod-http-cache-purge.conf<\/span><\/pre>\r\n<p><strong>(d)<\/strong> Create a symbolic link to the configuration file that loads the custom <code><span style=\"font-size: 12pt;\">ngx_http_cache_purge_module_custom.so<\/span><\/code> :<\/p>\r\n<pre><span style=\"font-size: 12pt;\">ln -s \/etc\/nginx\/modules-available\/50-mod-http-cache-purge-custom.conf \/etc\/nginx\/modules-enabled\/50-mod-http-cache-purge-custom.conf<\/span><\/pre>\r\n<p><strong>(e)<\/strong> Test and reload:<\/p>\r\n<pre><span style=\"font-size: 12pt;\">nginx -t<\/span>\r\n<span style=\"font-size: 12pt;\">systemctl reload nginx<\/span><\/pre>\r\n<h2><span class=\"ez-toc-section\" id=\"why_this_matters\"><\/span><strong>Why This Matters<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>With the custom-built purge module:<\/p>\r\n<ul>\r\n<li>Cache purge requests succeed even when PHP-FPM pools run under <strong>non-www-data users<\/strong>.<\/li>\r\n<li><a href=\"https:\/\/olvy.net\/blog\/introducing-olvy-cache-purger\/\"><strong>WordPress and other CMS plugins<\/strong><\/a> that rely on cache invalidation start working reliably again.<\/li>\r\n<li>You keep the security and isolation benefits of per-site system users without breaking cache management.<\/li>\r\n<\/ul>\r\n<p>Rebuilding the purge module from Debian sources gives you both <strong>compatibility<\/strong> and <strong>reliability<\/strong>, ensuring your cache strategy works seamlessly in secure, multi-user environments. \u00a0<\/p>\r\n<hr \/>\r\n<p><em>About Olvy ( <a href=\"https:\/\/olvy.net\/\">www.olvy.net<\/a> ) :<\/em><\/p>\r\n<p data-start=\"2189\" data-end=\"2468\"><!-- \/wp:post-content --><\/p>\r\n<p><!-- wp:paragraph --><\/p>\r\n<p><em>Olvy is a private and independent Limited Liability Company based in Bratislava, Slovakia, in the heart of Europe. We combined our invaluable 20+ years experience to develop innovative and reliable, lightning-fast and affordable Managed Cloud Hosting services for Everyone. From a small blog to a growing eCommerce \u2013 Olvy takes care of your website 24\/7.<\/em> \u00a0<\/p>\r\n<!-- wp:code -->\r\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\r\n<!-- \/wp:code -->","protected":false},"excerpt":{"rendered":"<p>When running NGINX with caching on Debian 12, you may discover that cache purging doesn\u2019t work if your PHP-FPM pool runs under a custom system&hellip;<\/p>\n","protected":false},"author":23,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[17,2,38],"tags":[87,29,102,86,141],"class_list":["post-1924","post","type-post","status-publish","format-standard","hentry","category-guides","category-news","category-technology","tag-cache","tag-debian","tag-debian12","tag-nginx","tag-purge"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users - Olvy Blog<\/title>\n<meta name=\"description\" content=\"Fix NGINX cache purge issues on Debian 12 with custom PHP-FPM users. Step-by-step guide to restore secure and efficient caching\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users - Olvy Blog\" \/>\n<meta property=\"og:description\" content=\"Fix NGINX cache purge issues on Debian 12 with custom PHP-FPM users. Step-by-step guide to restore secure and efficient caching\" \/>\n<meta property=\"og:url\" content=\"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/\" \/>\n<meta property=\"og:site_name\" content=\"Olvy Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/olvycloud\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-08T16:58:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-24T09:42:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"366\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"olvywriter\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@olvycloud\" \/>\n<meta name=\"twitter:site\" content=\"@olvycloud\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"olvywriter\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/\"},\"author\":{\"name\":\"olvywriter\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/person\\\/256b8cc1d90850acce9336449b2bced1\"},\"headline\":\"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users\",\"datePublished\":\"2025-09-08T16:58:21+00:00\",\"dateModified\":\"2025-11-24T09:42:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/\"},\"wordCount\":596,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/olvy_cache_purger.png\",\"keywords\":[\"cache\",\"debian\",\"debian12\",\"nginx\",\"purge\"],\"articleSection\":[\"Hosting Guides\",\"News\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/\",\"name\":\"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users - Olvy Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/olvy_cache_purger.png\",\"datePublished\":\"2025-09-08T16:58:21+00:00\",\"dateModified\":\"2025-11-24T09:42:55+00:00\",\"description\":\"Fix NGINX cache purge issues on Debian 12 with custom PHP-FPM users. Step-by-step guide to restore secure and efficient caching\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#primaryimage\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/olvy_cache_purger.png\",\"contentUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/olvy_cache_purger.png\",\"width\":700,\"height\":366,\"caption\":\"Olvy Cache Purger (Purge Nginx FastCGI Cache)\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/how-to-fix-nginx-cache-purge-on-debian12\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/olvy.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/\",\"name\":\"Olvy Blog\",\"description\":\"News, Guides, Information\",\"publisher\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/olvy.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#organization\",\"name\":\"Olvy s.r.o.\",\"alternateName\":\"Olvy\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/olvy_400x400.png\",\"contentUrl\":\"https:\\\/\\\/olvy.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/olvy_400x400.png\",\"width\":400,\"height\":400,\"caption\":\"Olvy s.r.o.\"},\"image\":{\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/olvycloud\\\/\",\"https:\\\/\\\/x.com\\\/olvycloud\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/olvycloud\",\"https:\\\/\\\/mastodon.social\\\/@olvy\",\"https:\\\/\\\/www.threads.net\\\/@olvycloud\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/olvy.net\\\/blog\\\/#\\\/schema\\\/person\\\/256b8cc1d90850acce9336449b2bced1\",\"name\":\"olvywriter\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g\",\"caption\":\"olvywriter\"},\"url\":\"https:\\\/\\\/olvy.net\\\/blog\\\/author\\\/olvywriter\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users - Olvy Blog","description":"Fix NGINX cache purge issues on Debian 12 with custom PHP-FPM users. Step-by-step guide to restore secure and efficient caching","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/","og_locale":"en_US","og_type":"article","og_title":"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users - Olvy Blog","og_description":"Fix NGINX cache purge issues on Debian 12 with custom PHP-FPM users. Step-by-step guide to restore secure and efficient caching","og_url":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/","og_site_name":"Olvy Blog","article_publisher":"https:\/\/www.facebook.com\/olvycloud\/","article_published_time":"2025-09-08T16:58:21+00:00","article_modified_time":"2025-11-24T09:42:55+00:00","og_image":[{"width":700,"height":366,"url":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png","type":"image\/png"}],"author":"olvywriter","twitter_card":"summary_large_image","twitter_creator":"@olvycloud","twitter_site":"@olvycloud","twitter_misc":{"Written by":"olvywriter","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#article","isPartOf":{"@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/"},"author":{"name":"olvywriter","@id":"https:\/\/olvy.net\/blog\/#\/schema\/person\/256b8cc1d90850acce9336449b2bced1"},"headline":"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users","datePublished":"2025-09-08T16:58:21+00:00","dateModified":"2025-11-24T09:42:55+00:00","mainEntityOfPage":{"@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/"},"wordCount":596,"commentCount":0,"publisher":{"@id":"https:\/\/olvy.net\/blog\/#organization"},"image":{"@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#primaryimage"},"thumbnailUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png","keywords":["cache","debian","debian12","nginx","purge"],"articleSection":["Hosting Guides","News","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/","url":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/","name":"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users - Olvy Blog","isPartOf":{"@id":"https:\/\/olvy.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#primaryimage"},"image":{"@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#primaryimage"},"thumbnailUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png","datePublished":"2025-09-08T16:58:21+00:00","dateModified":"2025-11-24T09:42:55+00:00","description":"Fix NGINX cache purge issues on Debian 12 with custom PHP-FPM users. Step-by-step guide to restore secure and efficient caching","breadcrumb":{"@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#primaryimage","url":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png","contentUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2025\/07\/olvy_cache_purger.png","width":700,"height":366,"caption":"Olvy Cache Purger (Purge Nginx FastCGI Cache)"},{"@type":"BreadcrumbList","@id":"https:\/\/olvy.net\/blog\/how-to-fix-nginx-cache-purge-on-debian12\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/olvy.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Fix NGINX Cache Purge on Debian 12 with Custom PHP-FPM Users"}]},{"@type":"WebSite","@id":"https:\/\/olvy.net\/blog\/#website","url":"https:\/\/olvy.net\/blog\/","name":"Olvy Blog","description":"News, Guides, Information","publisher":{"@id":"https:\/\/olvy.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/olvy.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/olvy.net\/blog\/#organization","name":"Olvy s.r.o.","alternateName":"Olvy","url":"https:\/\/olvy.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/olvy.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/01\/olvy_400x400.png","contentUrl":"https:\/\/olvy.net\/blog\/wp-content\/uploads\/2023\/01\/olvy_400x400.png","width":400,"height":400,"caption":"Olvy s.r.o."},"image":{"@id":"https:\/\/olvy.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/olvycloud\/","https:\/\/x.com\/olvycloud","https:\/\/www.linkedin.com\/company\/olvycloud","https:\/\/mastodon.social\/@olvy","https:\/\/www.threads.net\/@olvycloud"]},{"@type":"Person","@id":"https:\/\/olvy.net\/blog\/#\/schema\/person\/256b8cc1d90850acce9336449b2bced1","name":"olvywriter","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff7e0e4a07337c1c8a0c3184bd6638752265a156749d4d61e23010abe0a6abc4?s=96&d=mm&r=g","caption":"olvywriter"},"url":"https:\/\/olvy.net\/blog\/author\/olvywriter\/"}]}},"_links":{"self":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts\/1924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/comments?post=1924"}],"version-history":[{"count":15,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts\/1924\/revisions"}],"predecessor-version":[{"id":2051,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/posts\/1924\/revisions\/2051"}],"wp:attachment":[{"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/media?parent=1924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/categories?post=1924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/olvy.net\/blog\/wp-json\/wp\/v2\/tags?post=1924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}