• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Can we use "proxy_ignore_headers" in Apache & nginx Settings

Laurence@

Regular Pleskian
In Additional nginx directives can we do something like:


proxy_ignore_headers Cache-Control;
proxy_ignore_headers Set-Cookie;
 
I have tried to reproduce it. Added lines

proxy_ignore_headers Cache-Control;
proxy_ignore_headers Set-Cookie;

to Additional nginx directives and checked output of command:

# wget --server-response --spider http://_your_domain.tld
And really, I see there:

Set-Cookie: __cfduid=d90e80805e12314e9ecbad...

But this __cfduid is added by CloudFlare that works before target server.
Maybe it is your case?
 
Well. Default WordPress installation to default test Plesk domain. Lines

proxy_ignore_headers Cache-Control;
proxy_ignore_headers Set-Cookie;

added to Additional nginx directives.

# wget --server-response --spider http://ppu17-8.demo.pp.plesk.ru
Spider mode enabled. Check if remote file exists.
--2018-07-27 09:18:39-- http://ppu17-8.demo.pp.plesk.ru/
Resolving ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)... 10.58.108.108
Connecting to ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)|10.58.108.108|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 27 Jul 2018 03:18:39 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/7.2.8
Link: <https://ppu17-8.demo.pp.plesk.ru/index.php?rest_route=/>; rel="REST API Handbook | WordPress Developer Resources"
MS-Author-Via: DAV
X-Powered-By: PleskLin
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.

Looks fine, isn't it?
 
# wget --server-response --spider http://ppu17-8.demo.pp.plesk.ru
Spider mode enabled. Check if remote file exists.
--2018-07-27 09:34:28-- http://ppu17-8.demo.pp.plesk.ru/
Resolving ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)... 10.58.108.108
Connecting to ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)|10.58.108.108|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 27 Jul 2018 03:34:28 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/7.2.8
Link: <https://ppu17-8.demo.pp.plesk.ru/index.php?rest_route=/>; rel="REST API Handbook | WordPress Developer Resources"
MS-Author-Via: DAV
X-Cache-Status: MISS
X-Powered-By: PleskLin
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
 
[root@ppu17-5 ~]# wget --server-response --spider http://ppu17-8.demo.pp.plesk.ru
Spider mode enabled. Check if remote file exists.
--2018-07-27 09:42:56-- http://ppu17-8.demo.pp.plesk.ru/
Resolving ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)... 10.58.108.108
Connecting to ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)|10.58.108.108|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 27 Jul 2018 03:42:56 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/7.2.8
Link: <https://ppu17-8.demo.pp.plesk.ru/index.php?rest_route=/>; rel="REST API Handbook | WordPress Developer Resources"
MS-Author-Via: DAV
X-Cache-Status: STALE
X-Powered-By: PleskLin
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.

[root@ppu17-5 ~]# wget --server-response --spider http://ppu17-8.demo.pp.plesk.ru
Spider mode enabled. Check if remote file exists.
--2018-07-27 09:42:59-- http://ppu17-8.demo.pp.plesk.ru/
Resolving ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)... 10.58.108.108
Connecting to ppu17-8.demo.pp.plesk.ru (ppu17-8.demo.pp.plesk.ru)|10.58.108.108|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 27 Jul 2018 03:42:59 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/7.2.8
Link: <https://ppu17-8.demo.pp.plesk.ru/index.php?rest_route=/>; rel="REST API Handbook | WordPress Developer Resources"
MS-Author-Via: DAV
X-Cache-Status: HIT
X-Powered-By: PleskLin
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
 
I'm getting a cache HIT via CLI too:

Code:
[root@server ~]# wget --server-response --spider https://wpnex.us/
Spider mode enabled. Check if remote file exists.
--2018-07-27 00:04:48--  https://wpnex.us/
Resolving wpnex.us (wpnex.us)... 108.170.61.98
Connecting to wpnex.us (wpnex.us)|108.170.61.98|:443... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Server: nginx
  Date: Fri, 27 Jul 2018 04:04:48 GMT
  Content-Type: text/html; charset=UTF-8
  Connection: keep-alive
  Vary: Accept-Encoding
  X-Powered-By: PHP/7.2.6
  X-Pj-Cache-Status: miss
  Link: <https://wpnex.us/wp-json/>; rel="https://api.w.org/", <https://wpnex.us/>; rel=shortlink
  Vary: Accept-Encoding
  Cache-Control: max-age=2592000
  Expires: Sun, 26 Aug 2018 04:02:40 GMT
  X-Cache-Status: HIT
  X-Powered-By: PleskLin
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.

But via a browser it's not hitting the cache. Is wget loading the cookies? Interestingly enough my Redis cache that hits every time in a browser is missing with wget (X-Pj-Cache-Status: miss).
 
Browser headers:


General
  1. Request URL: Herald Home - WPNEXUS
  2. Request Method: GET
  3. Status Code: 200
  4. Remote Address: 108.170.61.98:443
  5. Referrer Policy: no-referrer-when-downgrade
Response Headers
  1. cache-control: max-age=2592000
  2. content-encoding: gzip
  3. content-length: 6238
  4. content-type: text/html; charset=UTF-8
  5. date: Fri, 27 Jul 2018 03:40:45 GMT
  6. expires: Sun, 26 Aug 2018 03:40:45 GMT
  7. link: <Herald Home - WPNEXUS>; rel=shortlink
  8. server: nginx
  9. status: 200
  10. vary: Accept-Encoding
  11. x-cache-status: BYPASS
  12. x-pj-cache-status: hit
  13. x-powered-by: PHP/7.2.6
  14. x-powered-by: PleskLin
Request Headers
  1. :authority: wpnex.us
  2. :method: GET
  3. :path: /
  4. :scheme: https
  5. accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  6. accept-encoding: gzip, deflate, br
  7. accept-language: en-US,en;q=0.9
  8. cache-control: max-age=0
  9. cookie: redux_current_tab_get=2; redux_current_tab=59; intercom-lou-cd6nxj3z=1; intercom-session-cd6nxj3z=Q09wUnZhZ3A1L3Jha0NPWGVCNXZkRlFmVXR6cXJ1RFRpUEx3bS9mMGJKdFBDOGxsaWZGaEpndUZWUzFVSVJQVy0tMklsR05NMzNuOEpxMUttYzMxVTM5UT09--1f2a7b8e3ee7ca707603196c3214764f19c3ecdf; wordpress_test_cookie=WP+Cookie+check
  10. referer: Log In ‹ WPNEXUS — WordPress
  11. upgrade-insecure-requests: 1
  12. user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Mobile Safari/537.36[
 
Still not able to get any HIT in a browser. Always vary between cache-control: max-age=0 and cache-control: no-cache. You can test in a browser. Renders Nginx cache on WordPress useless. Help please.
 
Hi,

i get a HIT on your Page:
Code:
Request URL: https://wpnex.us/solar-energy-for-mother-earth/
Request Method: GET
Status Code: 200
Remote Address: 96.125.178.146:443
Referrer Policy: no-referrer-when-downgrade
cache-control: max-age=86400
content-encoding: gzip
content-length: 8701
content-type: text/html; charset=UTF-8
date: Thu, 16 Aug 2018 11:37:18 GMT
expires: Fri, 17 Aug 2018 11:37:06 GMT
link: <https://wpnex.us/wp-json/>; rel="https://api.w.org/", <https://wpnex.us/?p=203>; rel=shortlink
server: nginx
status: 200
vary: Accept-Encoding,User-Agent
x-cache-status: HIT
x-pingback: https://wpnex.us/xmlrpc.php
x-pj-cache-status: miss
x-powered-by: PleskLin
x-powered-by: PHP/7.2.8
:authority: wpnex.us
:method: GET
:path: /solar-energy-for-mother-earth/
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
cache-control: max-age=0
referer: https://wpnex.us/hipster-yoga-at-the-end-of-the-world/
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

did you solve the problem?
 
Back
Top