The problem with calling in Wordpress admin mode Nginx + php

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

The problem with calling in Wordpress admin mode Nginx + php

Postby PritiSharma » 17 Feb 2017, 04:42

Good day.

There is a problem with which I cannot cope.

After setting up a WordPress caching Nginx + php-fpm, error appears in the admin panel, which should not be cached.
Normally, you can only go to the main admin type site.tld / wp-admin /, when you go to any other page of the admin climbs 404 Not Found code for the site the next, many times described on the Internet.

Code: Select all
#fastcgi_cache start
set $ no_cache 0;

# POST requests and urls with a query string should always go to PHP
if ($ request_method = POST) {
        set $ no_cache 1;
}   
if ($ query_string! = "") {
        set $ no_cache 1;
}   

# Do not cache uris containing the following segments
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;
}   

# Do not use the cache for logged in users or recent commenters
if ($ http_cookie ~ * "comment_author | wordpress_ [a-f0-9] + | wp-postpass | wordpress_no_cache | wordpress_logged_in") {
        set $ no_cache 1;
}


location ~ [^ /] \ php. (/ | $) {
   fastcgi_split_path_info ^ (.?. + \ php) (/.*) $;
   if (! -f $ document_root $ fastcgi_script_name) {
      404 return;
   }
   # This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)

   include fastcgi.conf;
   fastcgi_index index.php;
# Fastcgi_intercept_errors on;
fastcgi_pass unix: /var/run/php5-fpm.sock;
# Fastcgi_pass php;

   fastcgi_cache_bypass $ no_cache;
   fastcgi_no_cache $ no_cache;

   fastcgi_cache WORDPRESS;
   fastcgi_cache_valid 200 60m;
}
It seems that the problem lies in the lines of
location The ~ [^ /] \? Php (/ | $) {.
Fastcgi_split_path_info ^ (+ \? Php.?.) (/.*) $;
the if (! -f $ document_root $ fastcgi_script_name) {
return statement 404;
}


Experts, please help me to correctly configure this.
PritiSharma
 
Posts: 1
Joined: 17 Feb 2017, 04:30

Re: The problem with calling in Wordpress admin mode Nginx +

Postby Colin » 17 Feb 2017, 08:11

Sorry can't help (not won't) as I know nothing about this.

This forum is for the support of the Suffusion Theme, what you are asking about is nothing to do with the theme. You probably need to ask on StackExchange or similar.
Colin
 
Posts: 4991
Joined: 27 Oct 2009, 10:46


Return to Support Requests

Who is online

Users browsing this forum: No registered users and 4 guests

cron