'Access denied' Error on /wp-admin/ and Blank Page on other pages
-
Hi,
I just install WP-FFPC and find several problems. After I apply the nginx conf, I could not visit my site.
The website homepage is just a blank page (not login). The response header:
HTTP/1.1 200 OK
Server: nginx/1.9.6
Date: Fri, 30 Oct 2015 11:31:23 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Cache-Engine: not cachedVisit the https://www.xxx.com/wp-admin/, Get ‘Access denied’ Error:
HTTP/1.1 403 Forbidden
Server: nginx/1.9.6
Date: Fri, 30 Oct 2015 11:34:10 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-aliveThe whole nginx.conf:
user www www;
worker_processes 16;worker_cpu_affinity 0000000000000001 0000000000000010 0000000000000100 0000000000001000 0000000000010000 0000000000100000 0000000001000000 0000000010000000 0000000100000000 0000001000000000 0000010000000000 0000100000000000 0001000000000000 0010000000000000 0100000000000000 1000000000000000;
error_log /home/wwwlogs/error_nginx.log crit;
pid /var/run/nginx.pid;
google_perftools_profiles /tmp/tcmalloc;
worker_rlimit_nofile 1024000;events {
use epoll;
worker_connections 1024000;
}http {
# memcached servers, generated according to wp-ffpc config
upstream memcached-servers {
server 127.0.0.1:11211;
}
# PHP-FPM upstream; change it accordingly to your local config!
upstream php-fpm {
server unix:/dev/shm/php-cgi.sock;
}
server {
listen 80;
index index.php
server_name https://www.xxx.com;
root /home/wwwroot/xxx/;# set up logging
access_log /var/log/nginx/www.xxx.com.access.log;
error_log /var/log/nginx/www.xxx.com.error.log;## PHP5-FPM
location ~ (\.php) {
# these settings are usually in fastcgi_paramsfastcgi_index index.php;
fastcgi_connect_timeout 10;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 512k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_keep_conn on;fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param REDIRECT_STATUS 200;# uncomment these for HTTPS usage
#fastcgi_param HTTPS $https if_not_empty;
#fastcgi_param SSL_PROTOCOL $ssl_protocol if_not_empty;
#fastcgi_param SSL_CIPHER $ssl_cipher if_not_empty;
#fastcgi_param SSL_SESSION_ID $ssl_session_id if_not_empty;
#fastcgi_param SSL_CLIENT_VERIFY $ssl_client_verify if_not_empty;default_type text/html;
set $memcached_raw_key $scheme://$host$request_uri;
set $memcached_key data-$memcached_raw_key;
set $memcached_request 1;
if ($request_method = POST ) {
set $memcached_request 0;
}if ( $uri ~ “/wp-” ) {
set $memcached_request 0;
}if ( $args ) {
set $memcached_request 0;
}if ($http_cookie ~* “comment_author_|wordpressuser_|wp-postpass_|wordpress_logged_in_” ) {
set $memcached_request 0;
}if ( $memcached_request = 1) {
memcached_pass memcached-servers;
error_page 404 = @nocache;
break;
}fastcgi_pass unix:/dev/shm/php-cgi.sock;
}location @nocache {
add_header X-Cache-Engine “not cached”;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
}location / {
try_files $uri $uri/ /index.php;
}
}
}The Nginx error log:
2015/10/30 19:25:02 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”
2015/10/30 19:25:03 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”, referrer: “https://www.xxx.com/wp-admin/options-general.php?page=wp-ffpc-settings”
2015/10/30 19:25:07 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”, referrer: “https://www.xxx.com/wp-admin/options-general.php?page=wp-ffpc-settings”
2015/10/30 19:26:04 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”, referrer: “https://www.xxx.com/wp-admin/options-general.php?page=wp-ffpc-settings”
2015/10/30 19:26:06 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”
2015/10/30 19:26:08 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”, referrer: “https://www.xxx.com/wp-admin/options-general.php?page=wp-ffpc-settings”
2015/10/30 19:26:11 [error] 14381#0: *8 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”
2015/10/30 19:27:07 [error] 14381#0: *17 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “GET /wp-admin/ HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”
2015/10/30 19:34:10 [error] 14381#0: *33 FastCGI sent in stderr: “Access to the script ‘/home/wwwroot/xxx’ has been denied (see security.limit_extensions)” while reading response header from upstream, client: 123.119.106.238, server: , request: “GET /wp-admin/ HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-cgi.sock:”, host: “www.xxx.com”And the php-fpm.conf:
[global]
pid = run/php-fpm.pid
error_log = log/php-fpm.log
log_level = warningemergency_restart_threshold = 30
emergency_restart_interval = 60s
process_control_timeout = 5s
daemonize = yes[www]
listen = /dev/shm/php-cgi.sock
# listen = /var/run/php5-fpm.sock;
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666security.limit_extensions = .php .html
user = www
group = www
pm = dynamic# pm.start_servers = 80
# pm.max_children = 120
# pm.min_spare_servers = 70
# pm.max_spare_servers = 120pm.start_servers = 80
pm.max_children = 360
pm.min_spare_servers = 80
pm.max_spare_servers = 360pm.max_requests = 10240
pm.process_idle_timeout = 10s
request_terminate_timeout = 300
rlimit_files = 1024000
rlimit_core = 0catch_workers_output = yes
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmpNginx: 1.9.6
PHP: 5.6.14
Memcached: 1.4.24Please help me out. Thanks.
- The topic ‘'Access denied' Error on /wp-admin/ and Blank Page on other pages’ is closed to new replies.