Cache issues with redis and nginx
Cache issues with redis and nginx
Cache issues with redis and nginx
Use this plugin in wordpress and write rule which will overwrite nginx rule. https://wordpress.org/plugins/rewrite/ When you have wordpress, you have to set permalink to default to work your webserver rule work and if you dont want to do that you have to install above plugin and write rule.
Issue was caused by nginx serving example.com/index.php while WordPress was redirecting to example.com/, thus causing a redirect loop. This is the working config I used to fixed the redirect loop: server { server_name example.com; root /var/www/example.com; index index.php; listen 443 ssl; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; location / { try_files $uri @apache; … Read more
Try using the following for your rewrite rules: location / { try_files $uri $uri/ /index.php$is_args$args; } Using that schema, you can manually remove index.php from your Permalinks settings without breaking anything. Nginx will now check any URI for its existence as a file on the filesystem, and then a directory on the filesystem, and if … Read more
After discovering the exact problem in this case, the request headers being too large because ServerSideRender sending too many attributes in a GET request, I opened a ticket on the Gutenberg development repository proposing a few possible solutions for this issue. And the issue had actually already been addressed because I wasn’t the first one … Read more
Your server does not have mod_rewrite enabled Or you do not have AllowOverride set correctly to allow your .htaccess file to operate correctly. You will need AllowOverride set to at least FileInfo. I’d bet on the latter, as mod_rewrite is pretty ubiquitous. Based on your edit, the issue is that Nginx doesn’t use .htaccess files. … Read more
Ok some wise guy deleted my last post. The answer, which the above member (@etc) gave to me on another forum, and is working quite fine, is as follows: # Rewrites for Bedrock Multi-Site Subdomain Setup rewrite /wp-admin$ $scheme://$host$uri/ last; rewrite ^/(wp-.*.php)$ /wp/$1 last; rewrite ^/(wp-(content|admin|includes).*) /wp/$1 last; He revised his answer but did not … Read more
Create a file specifically for W3 Total Cache configuration for your site, in a location Nginx/PHP-FPM can write to. Include this file in your site’s Nginx server configuration. Then on the General Settings page, under Miscellaneous provide the full path to this file in the “Nginx server configuration file path” field. W3TC will then know … Read more
I ended up changing location ~ ^/.*\.php$ { try_files $uri = 404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } to location ~ ^/.*\.php$ { try_files $uri $uri/ /index.php?$args; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } It now works, but I feel that is a security issue now.
Sounds like your expires headers are set to far in the future. The following rules can be added to your .htaccess Expires rules can be added to your Nginx server file to shorten the expires time down to 180 seconds. location ~* \/[^\/]+\/(feed|\.xml|.html|.HTML)\/? { expires 180; } I would also suggest installing the Nginx Proxy … Read more