Hello
Sorry if there is simmilat topic already, but I didn't find it
I'm using Vesta 0.9.8 (i686) Release: 17
httpd-2.2.15-115.el6.1.i386
nginx-1.12.1-1.el6.ngx.i386
vesta-nginx-0.9.8-17.i686
I have a simple php script that shows user IP. But I'm noticed a problem. When I'm making many requests to this script at the same time from different IP's via proxy - it returns same result page for most requests.
Example:
IP 111.111.111.111 - Result: 111.111.111.111
IP 111.111.111.112 - Result: 111.111.111.111
IP 111.111.111.113 - Result: 111.111.111.111
IP 111.111.111.114 - Result: 111.111.111.111
IP 111.111.111.115 - Result: 111.111.111.115
IP 111.111.111.116 - Result: 111.111.111.115
Looks like some kind of caching.
So I checked nginx setting and tried to add bypass instructions into php.ini
proxy_cache_bypass $http_pragma $cookie_nocache $arg_nocache$arg_comment;
Also from client side I've added headers
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
It didn't helped.
Currently server response looks like:
----------------------------------------------------------
HTTP/1.0 200 OK
Server: nginx
Date: Fri, 27 Oct 2017 20:03:37 GMT
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.6.31
Connection: keep-alive
Content-Length: 14
111.111.111.115
----------------------------------------------------------
What I'm doing wrong?
Sorry if there is simmilat topic already, but I didn't find it
I'm using Vesta 0.9.8 (i686) Release: 17
httpd-2.2.15-115.el6.1.i386
nginx-1.12.1-1.el6.ngx.i386
vesta-nginx-0.9.8-17.i686
I have a simple php script that shows user IP. But I'm noticed a problem. When I'm making many requests to this script at the same time from different IP's via proxy - it returns same result page for most requests.
Example:
IP 111.111.111.111 - Result: 111.111.111.111
IP 111.111.111.112 - Result: 111.111.111.111
IP 111.111.111.113 - Result: 111.111.111.111
IP 111.111.111.114 - Result: 111.111.111.111
IP 111.111.111.115 - Result: 111.111.111.115
IP 111.111.111.116 - Result: 111.111.111.115
Looks like some kind of caching.
So I checked nginx setting and tried to add bypass instructions into php.ini
proxy_cache_bypass $http_pragma $cookie_nocache $arg_nocache$arg_comment;
Also from client side I've added headers
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
It didn't helped.
Currently server response looks like:
----------------------------------------------------------
HTTP/1.0 200 OK
Server: nginx
Date: Fri, 27 Oct 2017 20:03:37 GMT
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.6.31
Connection: keep-alive
Content-Length: 14
111.111.111.115
----------------------------------------------------------
What I'm doing wrong?