Closed lamariabdo closed 5 years ago
Logged in users to what? This is an Nginx service so there is no login. Are you describing another application outside of NGINX?
Thank you for your reply,
logged users in wp-admin.
for example if i login to wp-admin the admin bar cache with homepage.
and please how i can purge cache with curl?
i run this command and its not work curl "https://localhost/purge/"
What have you tried to solve this? Just trying to purge? Have you googled how to stop this from happening? This is likely less of a PHP thing and more a cookie thing. This is not a Wordpress support channel so I don't have the time right now to troubleshoot a Wordpress install. If you search around there are a few pathways you can take to solve this in your configs.
Hello, i add this my vhost conf but still not work
location / {
set $no_cache 0;
if ($request_method = POST) {
set $no_cache 1;
}
if ($query_string != "") {
set $no_cache 1;
}
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
set $no_cache 1;
}
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $no_cache 1;
}
proxy_pass http://proxy/;
proxy_redirect / /;
error_page 502 =200 @failed;
proxy_cache_bypass $http_pragma $no_cache $cookie_nocache $arg_nocache;
proxy_no_cache $no_cache ;
}
Is there a reason for overriding the $no_cache configuration? There is a map for $no_cache
set in the nginx.conf
file
map $request_uri $no_cache {include /etc/nginx/map.d/nocache/*.map;}
I would suggest creating a modified or new map ie map $http_cookie $no_cache
and then correctly configure your context blocks.
I updated a map that shows you how this should be done. Since I can't recreate your environment, I can't test this for you. However, this is in keeping with the config pattern. I'm sure you can learn from here if it does not work out of the box for you.
map $request_uri $no_cache {include /etc/nginx/map.d/nocache/nocache.map;}
map $http_cookie $no_cache {include /etc/nginx/map.d/nocache/cookie.map;}
This is in conf/php
only.
@tspicer Thank's i will check this.
i have a question please. how to change Memory limit
, Max execution time
, Max input vars
?
i'm using ob_php-fpm.
there is only PHP_MEMORY_LIMIT
in the env file.
@tspicer
It's work Thank you so much !!
one last thing please, there is any way to override **Max execution time, Max input vars**
without touch in php-pfm conf? like .user.ini i tried this but it's not work any suggestion?
Just mount your own config for php.
i fixed it, thank you.
@tspicer hello, sorry i have a problem, i'm running openbridge/nginx on centos 7 he doesn't have user/group www-data by default, I get permission denied when I try to edit a file.
Hello @tspicer
Please how can i prevent nginx for not cache page with users logged in because admin bar cache with page.
I use default openbridge/nginx configuration for nginx.
Can you help me fix it i would appreciate your help thank you.