Title: NGINX reverse proxy
Last modified: February 3, 2022

---

# NGINX reverse proxy

 *  Resolved [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/)
 * I have switched to NGINX reverse proxy after poor results with LiteSpeed.
 * I understood W3 Total Cache generates an nginx.conf file at the root of the wordpress
   install. I cannot find this.
 * Could you please advise me on this?
 * Thanks

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15324911)
 * Hello [@plan9](https://wordpress.org/support/users/plan9/)
 * Thank you for reaching out and I am happy to assist you with this.
    This depends
   on where WordPress is installed. The main nginx.conf should be located in /etc/
   nginx/nginx.conf There should also be an nginx.conf in the root of your website
   installation. W3TC may create the nginx.conf id it does not exist and the created
   one (if needed) is located at the root of your website. You can also check this
   in the plugin in Performance>Install. There you can see the rewrite rules and
   the location of the nginx.conf. I hope this helps! Thnaks!
 *  Thread Starter [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15325137)
 * Hello
 * Thanks for your reply. I can see the main nginx.conf located at /etc/nginx/nginx.
   conf
 * I can’t find any nginx.conf at the web root of the wordpress site – and no mention
   of nginx.conf in Performance & Install.
 * I don’t know if it is related but in the compatibility check it also lists all
   the apache mods as not detected, eg: mod_deflate: Not detected (required for 
   disk enhanced Page Cache and Browser Cache)
 * This was not the case before installing NGINX reverse proxy.
    -  This reply was modified 4 years, 4 months ago by [George M](https://wordpress.org/support/users/plan9/).
    -  This reply was modified 4 years, 4 months ago by [George M](https://wordpress.org/support/users/plan9/).
 *  Thread Starter [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15325180)
 * I am seeing ‘Nginx’ in the headers, so the reverse proxy is working. It just 
   doesn’t look like W3 Total Cache is aware of it.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15327977)
 * Hello [@plan9](https://wordpress.org/support/users/plan9/)
 * Thank you for reaching out.
    I am not quite sure what do you mean by the statement:
 * > reverse proxy is working. It just doesn’t look like W3 Total Cache is aware
   > of it.
 * mod_deflate is an Apache module, so if you are on an Apache server and using 
   nginx proxy, this is not related to W3 Total Cache as W3 Total Cache adds the
   rules for the server env.
    Can you please enable the option Set W3 Total Cache
   header in Performance>Browser Cache, save all settings and purge the cache and
   share the website URL? Thanks!
 *  Thread Starter [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15329807)
 * Hi
 * > I am not quite sure what do you mean by the statement:
   > reverse proxy is working. It just doesn’t look like W3 Total Cache is aware
   > of it.
 * OK – so W3 Total Cache only adds a config file when NGINX is used as the server–
   not used as reverse proxy for Apache?
 * Here are example headers from the same server:
 *     ```
       Request URL: https://hub.site.com/alex/2021/11/12/my-first-post/
       Request Method: GET
       Status Code: 200 
       Remote Address: 88.422.28.16:443
       Referrer Policy: no-referrer-when-downgrade
   
       cache-control: max-age=3600, public
       content-encoding: gzip
       content-type: text/html; charset=UTF-8
       date: Fri, 04 Feb 2022 16:38:45 GMT
       etag: W/"b036a2b04f0c6d8330965e6619cddb4e"
       last-modified: Fri, 04 Feb 2022 16:38:18 GMT
       link: <https://hub.site.com/alex/wp-json/>; rel="https://api.w.org/", <https://hub.site.com/alex/wp-json/wp/v2/posts/37>; rel="alternate"; type="application/json", <https://hub.site.com/alex/?p=37>; rel=shortlink
       pragma: public
       referrer-policy: no-referrer-when-downgrade
       server: nginx
       vary: X-Forwarded-Proto,Accept-Encoding
       x-pingback: https://hub.site.com/alex/xmlrpc.php
       x-powered-by: W3 Total Cache/2.2.1
   
       :authority: hub.site.com
       :method: GET
       :path: /alex/2021/11/12/my-first-post/
       :scheme: https
       accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
       accept-encoding: gzip, deflate, br
       accept-language: en-GB,en;q=0.9
       cache-control: no-cache
       cookie: wordpress_test_cookie=WP+Cookie+check; wp_lang=en_GB; _ga=GA1.2.1656508639.1635758655; cookielawinfo-checkbox-necessary=yes; cookielawinfo-checkbox-functional=yes; cookielawinfo-checkbox-performance=yes; cookielawinfo-checkbox-analytics=yes; cookielawinfo-checkbox-advertisement=yes; cookielawinfo-checkbox-others=yes; CookieLawInfoConsent=eyJuZWNlc3NhcnkiOnRydWUsImZ1bmN0aW9uYWwiOnRydWUsInBlcmZvcm1hbmNlIjp0cnVlLCJhbmFseXRpY3MiOnRydWUsImFkdmVydGlzZW1lbnQiOnRydWUsIm90aGVycyI6dHJ1ZX0=; viewed_cookie_policy=yes
       pragma: no-cache
       referer: https://hub.site.com/alex/
       sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"
       sec-ch-ua-mobile: ?0
       sec-ch-ua-platform: "macOS"
       sec-fetch-dest: document
       sec-fetch-mode: navigate
       sec-fetch-site: same-origin
       sec-fetch-user: ?1
       upgrade-insecure-requests: 1
       user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
       ```
   
 *     ```
       Request URL: https://hub.site.com/alex/2021/11/12/my-first-post/
       Request Method: GET
       Status Code: 200 
       Remote Address: 87.76.28.42:443
       Referrer Policy: no-referrer-when-downgrade
   
       cache-control: max-age=3600, public
       content-encoding: gzip
       content-type: text/html; charset=UTF-8
       date: Fri, 04 Feb 2022 16:38:45 GMT
       etag: W/"b036a2b04f0c6dh578ur65e6619cddb4e"
       last-modified: Fri, 04 Feb 2022 16:38:18 GMT
       link: <https://hub.site.com/alex/wp-json/>; rel="https://api.w.org/", <https://hub.site.com/alex/wp-json/wp/v2/posts/37>; rel="alternate"; type="application/json", <https://hub.site.com/alex/?p=37>; rel=shortlink
       pragma: public
       referrer-policy: no-referrer-when-downgrade
       server: nginx
       vary: X-Forwarded-Proto,Accept-Encoding
       x-pingback: https://hub.site.com/alex/xmlrpc.php
       x-powered-by: W3 Total Cache/2.2.1
   
       :authority: hub.site.com
       :method: GET
       :path: /alex/2021/11/12/my-first-post/
       :scheme: https
       accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
       accept-encoding: gzip, deflate, br
       accept-language: en-GB,en;q=0.9
       cache-control: no-cache
       cookie: wordpress_test_cookie=WP+Cookie+check; wp_lang=en_GB; _ga=GA1.2.1656508639.1635757270; cookielawinfo-checkbox-necessary=yes; cookielawinfo-checkbox-functional=yes; cookielawinfo-checkbox-performance=yes; cookielawinfo-checkbox-analytics=yes; cookielawinfo-checkbox-advertisement=yes; cookielawinfo-checkbox-others=yes; CookieLawInfoConsent=eyJuZWNlc3NhcnkiOfgoerngswtmZ1bmN0aW9uYWwiOnRydWUsInBlcmZvcm1hbmNlIjp0cnVlLCJhbmFseXRpY3MiOnRydWUsImFkdmVysfhuybnQiOnRydWUsIm90aGVycyI6dHJ1ZX0=; viewed_cookie_policy=yes
       pragma: no-cache
       referer: https://hub.site.com/alex/
       sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"
       sec-ch-ua-mobile: ?0
       sec-ch-ua-platform: "macOS"
       sec-fetch-dest: document
       sec-fetch-mode: navigate
       sec-fetch-site: same-origin
       sec-fetch-user: ?1
       upgrade-insecure-requests: 1
       user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
       ```
   
    -  This reply was modified 4 years, 4 months ago by [George M](https://wordpress.org/support/users/plan9/).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15330032)
 * Hello [@plan9](https://wordpress.org/support/users/plan9/)
 * Yes, this is correct. Your website is on Apache using Nginx as a Proxy.
    W3TC
   will only add rules for .htaccess as it detects the Apache server. As you can
   see, Cache-control, Gzip, Etag, Last modified, and x-powered-by are all added
   by W3 Total Cache.
 * Thanks!
 *  Thread Starter [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15330063)
 * Hello [@vmarko](https://wordpress.org/support/users/vmarko/)
 * Oh great. So everything is working as expected? The NGINX reverse proxy cache
   is a bit strange as there are no controls apart from emptying the cache.
 * If I keep W3TC handling the page cache will this be slower than just letting 
   NGINX cache the pages? I read somewhere that W3TC enhanced disk caching still
   needs to use PHP. Is that correct?
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15330131)
 * Hello [@plan9](https://wordpress.org/support/users/plan9/)
 * Yes as I can see everything is working as expected.
    A proxy server is a go‑between
   or intermediary server that forwards requests for content from multiple clients
   to different servers across the Internet. When you are using Proxy and W3TC it’s
   much faster than only using an Nginx proxy. And no, Disk: Enhanced serves cached
   pages using the server’s URL rewriting capabilities, skipping PHP and WordPress
   entirely. It’s faster and more efficient. Thanks!
 *  Thread Starter [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15330281)
 * Thanks [@vmarko](https://wordpress.org/support/users/vmarko/)
 * I really appreciate your help.
 * Using Apache + NGINX reverse proxy + W3 Total Cache I am seeing much better results
   than I ever did with LiteSpeed server (which I was paying for).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15336736)
 * Hello [@plan9](https://wordpress.org/support/users/plan9/)
 * You are most welcome!
 * We would really appreciate it if you could take a minute and post a review [here](https://wordpress.org/support/plugin/w3-total-cache/reviews/).
   This will help us to continue offering a top-notch product to users.
    Thanks!
 *  Thread Starter [George M](https://wordpress.org/support/users/plan9/)
 * (@plan9)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15363190)
 * [@vmarko](https://wordpress.org/support/users/vmarko/) Done!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘NGINX reverse proxy’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [nginx](https://wordpress.org/support/topic-tag/nginx/)

 * 11 replies
 * 2 participants
 * Last reply from: [George M](https://wordpress.org/support/users/plan9/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy/#post-15363190)
 * Status: resolved