Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Nginx Support #322

Open
fhumayun opened this issue Sep 16, 2014 · 8 comments
Open

Feature Request: Nginx Support #322

fhumayun opened this issue Sep 16, 2014 · 8 comments

Comments

@fhumayun
Copy link

Greetings,
I have the Quick Cache Pro plugin, and was hoping to request future support for Nginx ( especially for options like gzip compression ).

Cheers,
Faisal
http://seekeraftertruth.com

@raamdev
Copy link
Contributor

raamdev commented Sep 16, 2014

@fhumayun Thank you for the feature request!

Quick Cache already supports Nginx as a page-caching plugin, but I agree that it would be nice to add additional feature support for Nginx. I'll mark this as an enhancement for consideration during a future development cycle.

Related: #236.

@jaswrks
Copy link

jaswrks commented Mar 15, 2015

especially for options like gzip compression

What options would there be for GZIP compression on Nginx? This is something that is enabled at the server config. level in Nginx. Is there a way for ZenCache to say otherwise?

Or, is the idea that we would provide instructions about how to enable GZIP when running Nginx? i.e., provide details about Nginx server configuration?

@fhumayun
Copy link
Author

Gzip is enabled server side for apache too. If one is going the distance to offer to enable this for apache instances ( clearly quickcache is doing htaccess modification ), then why is it is confounding to at least investigate the viability of altering the nginx config, or at the very least, providing a snippet for the user to include in their nginx config.

@jaswrks
Copy link

jaswrks commented Mar 15, 2015

@fhumayun writes...

then why is it is confounding

Not confounding, I just want to clarify what you are asking for. Thank you for doing so.

@fhumayun
Copy link
Author

Apologies for the verbiage then. I was under the impression that your series of inquiries was flow-charting the request as not worthy of any pursuit out of hand.

@raamdev
Copy link
Contributor

raamdev commented Mar 31, 2015

Referencing this page that includes several Nginx-specific rules for various caching plugins: https://codex.wordpress.org/Nginx

We should investigate what specifically needs to be done to optimize Nginx for ZenCache and come up with a list of applicable rules for ZenCache (if any).

@jaswrks
Copy link

jaswrks commented Oct 2, 2015

Suggested Nginx Configuration for ZenCache

server {
  etag on;
  expires 7d;
  if_modified_since before;

  gzip on;
  gzip_vary on;
  gzip_comp_level 6;
  gzip_types text/plain text/xml image/svg+xml # text/html in core already.
    application/rss+xml application/atom+xml application/xhtml+xml
    text/css application/json application/x-javascript
    application/font-otf application/font-ttf;
}

See also, my full example here: https://github.com/jaswsinc/vagrant-ubuntu-lemp/blob/master/assets/nginx/.conf

@jaswrks
Copy link

jaswrks commented Oct 2, 2015

Suggested Apache Configuration for ZenCache

I'll go ahead and post this here, just to keep both together for now.

FileETag MTime Size
<IfModule expires_module>
  ExpiresActive on
  ExpiresDefault "access plus 1 week"
</IfModule>

<IfModule deflate_module>
    <IfModule filter_module>
        AddOutputFilterByType DEFLATE text/plain text/html
        AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
        AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
        AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
        AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
        AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
        <IfModule headers_module>
          <FilesMatch "\.(js|css|xml|svg|xhtml|html|txt|ttf|otf|gz)$">
            Header append Vary: Accept-Encoding
          </FilesMatch>
        </IfModule>
    </IfModule>
</IfModule>

@raamdev raamdev modified the milestones: Next Release (Pro), Future Release (Pro) Oct 3, 2015
@raamdev raamdev modified the milestones: Next Release (Pro), Future Release (Pro) Oct 29, 2015
@raamdev raamdev modified the milestones: Next Release (Pro), Future Release (Pro) Dec 2, 2015
@raamdev raamdev modified the milestones: Next Release (Pro), Future Release (Pro) Dec 28, 2015
@raamdev raamdev modified the milestones: Next Release (Pro); 1st CC Notice, Future Release (Pro) Feb 13, 2016
@raamdev raamdev modified the milestones: Next Release, Future Release Feb 26, 2016
@raamdev raamdev modified the milestone: Next Release Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants