• Resolved codimex

    (@codimex)


    Hi! First of all, congrats for this amazing plugin. I can see happy users everywhere with both the plugin’s functionality and your support.

    I’ve installed “Super Page Cache for Cloudflare” and the results seem very promising from the start. However, I’m facing a couple of issues. Some pages are still showing the browser’s cached version, even though I’ve cleared the cache. Digging into this forum, I think it’s a browser’s cache problem. Now, this is where I’m facing my problems:

    1) I’m on Siteground, and I’m not sure if SG uses NGINX, Apache or both. Looks like it’s NGINX, but I don’t know if this setting varies from SG user to another.

    2) Scrolling down in the “Cache” tab, I can see “Add browser caching rule for static files”, with an instrucions link: “Open the configuration file of your domain and add the following rules”. I’m not sure if my solution lies there, but I have no idea how to implement this, or restarting NGINX, or even if I can break something on my server.

    So: Is my Siteground server running on NGINX? What are the steps I need to take to implement proper’s browsing cache, provided this is what I need? I’m completely lost on this, but somehow I suspect I need to work on this to display the proper version of my website and prevent odd-looking loading pages. Does “NGINX Helper” plugin really help me to achieve this, or could it break my website/server, too?

    My WordPress installation and plugins are up-to-date, and I’m using no other cache plugin (should I?) in combination with “Super Page Cache for Cloudflare”.

    Any starting point would be really appreciated. Thank you, Saumya!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    I’m on Siteground, and I’m not sure if SG uses NGINX, Apache or both. Looks like it’s NGINX, but I don’t know if this setting varies from SG user to another.

    – Check the file manager of your site. If you see .htaccess file that would mean that SG is using Amache or Lightspeed as the server while Nginx as proxy. Just ignore the proxy part.

    If you don’t see a .htaccess file that would mean in most cases an NGINX server. In this case you need to ask your host to add the NGINX rules the plugin is asking you to add (Screenshot: https://i.imgur.com/HZ6EfBc.jpeg)

    But generally speaking, if you are in a shared server i.e. a server used by many people, it will not be NGINX. As Nginx is mostly used for VPS and Dedicated servers.
    But do look for that .htaccess file if it is there.

    Scrolling down in the “Cache” tab, I can see “Add browser caching rule for static files”, with an instrucions link: “Open the configuration file of your domain and add the following rules”. I’m not sure if my solution lies there, but I have no idea how to implement this, or restarting NGINX, or even if I can break something on my server.

    – If you are on an NGINX server, adding rules are not that easy. You neither need to ask your host to implement them or you need a server admin or you yourself need to be one who can perform these tasks. Generally if you are with a good managed hosting company like BigScoots then they will do it for you.

    Is my Siteground server running on NGINX?

    – I can’t say that with certainty, you need to ask your hosting company as they will be able to give you the most accurate answer.

    What are the steps I need to take to implement proper’s browsing cache, provided this is what I need?

    – If you are on an Apache or Lightspeed server, the plugin will add the rules automatically on the .htaccess file and that’s all.
    If you are in an NGINX server those rules need to be added manually to the nginx config file via UNIX command line.

    Does “NGINX Helper” plugin really help me to achieve this, or could it break my website/server, too?

    – No it’s a totally different page caching plugin related to Nginx FastCGI Cache. Don’t install this plugin it won’t help you.

    I’m using no other cache plugin (should I?)

    – No you should not. You should not have more than one page caching system in your site. Be that at the plugin level or at the server level.
    As this plugin provides you page caching, you can use other static file optimization plugin like Perfmatters or Autoptimize – if you like. But do not use another page caching system.

    Any starting point would be really appreciated

    1. First you need to figure out if your server is NGINX or Apache/Lightspeed. I told you how to figure that out. You can also ask your host about it and they will tell you.
    2. If it’s a NGINX server then send your managed host with the NGINX rules you want to add in the nginx config file and they should add it for you. If they don’t I will suggest you to shift to a better managed hosting provider like BigScoots.

    Thread Starter codimex

    (@codimex)

    WOW. JUST WOW! Thank you, thank you, thank you for taking the time to write such a detailed answer! I’m really impressed! I’ll be posting my 5-star review in a moment, after posting this.

    1. First you need to figure out if your server is NGINX or Apache/Lightspeed. I told you how to figure that out. You can also ask your host about it and they will tell you.

    I’ve just checked with them in their support channel. They confirm this to me (I’m translating it on-the-fly):

    The main web server is Apache (version 2.4) and uses NGINX direct delivery just for caching; therefore, if you have to choose a server, choose Apache.

    Does it make sense to you? Also, this post from their KB might help.

    Besides, I’m on a shared server (no VPS nor dedicated one) and I do have an .htaccess file. So, assuming I’m running on Apache, should I click on “Yes” in the “Add browser caching rule for static files” option? There are a lot of warnings in that section and I’m afraid I can break anything. :”(

    You should not have more than one page caching system in your site. Be that at the plugin level or at the server level.

    Ok, then. I’m not installing other cache option. Nevertheless, if no other cache plugin is recommended, why is there a “third party” tab in your plugin? I’ve read many people use it together with Autoptimize. Also, what about excluding asset loading via Asset CleanUP plugin, is it recommended in combination with “Super Page Cache for Cloudflare”?

    Thank you again, Saumya. I’m too newbie about everything involving the “cache-sphere”, and you’ve helped me clarifying my issues a lot.

    • This reply was modified 2 years, 2 months ago by codimex. Reason: Adding more info
    Plugin Contributor iSaumya

    (@isaumya)

    Besides, I’m on a shared server (no VPS nor dedicated one) and I do have an .htaccess file. So, assuming I’m running on Apache, should I click on “Yes” in the “Add browser caching rule for static files” option? There are a lot of warnings in that section and I’m afraid I can break anything. :”(

    – Yes if you have a .htaccess file then you are definitely using Amache or Lightspeed. While Nginx is used as proxy. Enabling browser cache rule will not break anything. It will just add the rules in your htaccess file to add the proper cache-control header for the static files.

    why is there a “third party” tab in your plugin? I’ve read many people use it together with Autoptimize.

    – Cause some people like to use. As I said previously you can definitely use Autoptimize or Perfmatter – both of them are amazing plugin. They are not page caching plugin but static file and other optimization plugin. So, if you want great modification for your CSS/JS files where currently they are not minified, you can use Auoptimize. But if your static files are already minified then Perfmatter is a better choice.

    Also, what about excluding asset loading via Asset CleanUP plugin, is it recommended in combination with “Super Page Cache for Cloudflare”?

    – Personally never used that plugin and no idea what it does. Never actually needed to use any such plugin. So, I cannot comment on that but you can do your own experimentation if you like.

    Hope this helps. ??

    Thread Starter codimex

    (@codimex)

    Big thank you again for your answer (on a Sunday!), even extending your help to other plugins. I’m marking this as resolved with honors; also, I couldn’t ask for more help after your detailed posts!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Setting up NGINX on Siteground’ is closed to new replies.