Welcome! Log In Create A New Profile

Advanced

caching issue on fast requests

Posted by Zuzlan 
caching issue on fast requests
October 29, 2017 11:18AM
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, only registered users may post in this forum.

Click here to login

Online Users

Guests: 134
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready