Support » Plugin: Super Page Cache for Cloudflare » complete Apache with Nginx – and Plesk settings

  • Resolved sneakerlove

    (@sneakerlove)


    Hi due to my slow page generation time investigation. could you
    1. please confirm these are the correct and complete Nginx settings for using your plugin, see screen grab:

    https://imgur.com/a/mdoPb1M

    and

    2.
    I do NOT have to manually add this Browser static files caching code (as mentioned by you for Nginx without plesk):

    Open the configuration file of your domain and add the following rules:
    
        location ~* \.(xml|xsl)$ { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; }
    location /robots.txt { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; }
    location ~* \.(css|js|pdf)$ { add_header Cache-Control "public, must-revalidate, proxy-revalidate, immutable, max-age=2592000, stale-while-revalidate=86400, stale-if-error=604800"; expires 30d; }
    location ~* \.(jpg|jpeg|png|gif|ico|eot|swf|svg|webp|avif|ttf|otf|woff|woff2|ogg|mp4|mpeg|avi|mkv|webm|mp3)$ { add_header Cache-Control "public, must-revalidate, proxy-revalidate, immutable, max-age=31536000, stale-while-revalidate=86400, stale-if-error=604800"; expires 365d; }
    location /wp-cron.php { add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; expires -1; }
    location = /wp-content/wp-cloudflare-super-page-cache/sneakerlove.net/debug.log { access_log off; deny all; }
                            
    Save and restart Nginx.

    and
    3. I do not have to change settings to YES in your plugin to
    Overwrite the cache-control header for WordPress’s pages using web server rules
    because you say: It works automatically if you are using Apache as web server or as backend web server.

    4. is Nginx actually still being used when only relying on Apache for handling?
    many thanks!!!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi,
    from what I see the plugin is working perfectly on your site and pages are being served from Cloudflare cache: https://i.imgur.com/y06Euld.jpeg

    From what I understand and I think is you got confused with the whole NGINX and Apache thing. Here is the gist of it. Your server is actually Apache so it uses .htaccess file – within which the plugin auto add all the rules needed if that file is writable. You don’t have to do anything.

    In your server what you have is what we call here a fake Nginx i.e. Nginx Proxy. It’s not really a Nginx server, rather an Apache server running over Nginx proxy. So, you don’t even worry about the Nginx part, as it’s nothing but a proxy.

    In future if you ever shift to a real Nginx server that is running on pure Nginx and no Apache, then you need to add all the nginx rules in your nginx.conf file. For now, your site caching is working perfectly.

    Hope this helps.

    Thread Starter sneakerlove

    (@sneakerlove)

    thank you Saumaya

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.