• Resolved hardoman

    (@hardoman)


    I have nginx running as PHP-FPM. I have configured W3 TC as suggested and have nginx.conf in the root of my web site with W3 TC config.
    When minify cache enabled I see is that it doesn’t create anything in wp-content/cache/minify/ folder while it writes in /wp-content/cache/object/ and wp-content/cache/page/
    The permissions over the folder are the same and nginx has write permissions there.

    I have even included W3 TC config in the main web site nginx.conf file but it doesn’t help.

    When switching to FastCGI (nginx+Apache) minify function is well. The user running nginx, php-fpm and apache is the same, so it’s not a matter of permissions.

    In the backend log:

    2021/04/09 21:20:20 [error] 19951#19951: *8736 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/f4186.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
    2021/04/09 21:20:20 [error] 19951#19951: *8730 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/b68ea.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
    2021/04/09 21:20:20 [error] 19951#19951: *8737 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/14d49.css HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
    2021/04/09 21:20:20 [error] 19951#19951: *8732 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/29055.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
    2021/04/09 21:20:20 [error] 19951#19951: *8735 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/1615d.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
    2021/04/09 21:20:20 [error] 19951#19951: *8729 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/e1df4.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
    2021/04/09 21:20:20 [error] 19951#19951: *8730 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 93.92.199.232, server: h1.ipnets.ru, request: "GET /wp-content/cache/minify/6a1d3.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/h1.ipnets.ru.sock:", host: "h1.ipnets.ru", referrer: "https://h1.ipnets.ru/velomagaziny/prokat-velosipedov-v-sankt-peterburg/"
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hardoman

    Thanks for reaching out.
    Please check the Performance>Install tab and follow the instructions and add the rules manually if not applied.
    Make sure to restart your nginx.
    Thanks!

    Thread Starter hardoman

    (@hardoman)

    The rules are in nginx.conf in the root of my web site with W3 TC config as I mentioned in my initial post.
    Nginx restarted several times.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hardoman

    I can confirm that this works as expected.
    The minify rewrites don’t work for you. So you should double-check the config. Your root rules are incorrect in the placement of nginx.conf inclusion.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘W3 Total cache minify is not working with nginx PHP-FPM’ is closed to new replies.