http请求报错:The requested resource is currently locked ?
Posted 周二也被占用
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了http请求报错:The requested resource is currently locked ?相关的知识,希望对你有一定的参考价值。
概要:
- 网站配置了腾讯云的CDN
- 同时想在同一个网站里加一个目录放WordPress
- 网站可以通过http及https访问,http默认跳转到https
nginx配置文件如下:
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events
worker_connections 1024;
http
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server
listen 80;
server_name www.nichuiniu.cn;
rewrite ^(.*)$ https://$server_name$1 permanent;
server
listen 443;
server_name www.nichuiniu.cn;
ssl on;
root /opt/nginx/dist;
index index.html index.htm;
gzip on;
gzip_static on;
gzip_min_length 5k;
gzip_buffers 4 16k;
#gzip_http_version 1.0;
gzip_comp_level 3;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
ssl_certificate /etc/nginx/cert/1529558537894.pem;
ssl_certificate_key /etc/nginx/cert/1529558537894.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location /v1
proxy_pass http://xxxxxxx/v1;
error_page 404 /index.html;
增加WordPress的配置后,Nginx配置如下
nginx的配置如下:
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events
worker_connections 1024;
http
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server
listen 80;
server_name www.nichuiniu.cn;
rewrite ^(.*)$ https://$server_name$1 permanent;
server
listen 443;
server_name www.nichuiniu.cn;
ssl on;
root /opt/nginx/dist;
index index.html index.htm;
gzip on;
gzip_static on;
gzip_min_length 5k;
gzip_buffers 4 16k;
#gzip_http_version 1.0;
gzip_comp_level 3;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
ssl_certificate /etc/nginx/cert/1529558537894.pem;
ssl_certificate_key /etc/nginx/cert/1529558537894.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location /v1
proxy_pass http://xxxxxxx/v1;
location /bpblog
index index.php index.html index.htm;
try_files $uri $uri/ /index.php index.php;
location ~ .php$
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
error_page 404 /index.html;
修改完nginx配置后发现,用http访问报错:
The requested resource is currently locked.
百度和谷歌没得到有效的答案,大多数的猜测是CDN有问题,因为无限次的循环导致的,抱着试一试的心态把CDN关了,一切又恢复正常!很奇怪新增的nginx配置为什么会影响http的请求?
PS:确认是我CDN的关系,前期配置了CDN,WordPress怎么着都登陆不了,去掉CDN之后,都能正常登陆!所以得研究研究CDN的配置
以上是关于http请求报错:The requested resource is currently locked ?的主要内容,如果未能解决你的问题,请参考以下文章
我正在尝试向公共 API 发出 GET 请求,但是,我得到 No 'Access-Control-Allow-Origin' header is present on the requested re
Flutter 报错“Cannot access the body fields of a Request”
关于Git上传项目报错error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
vue中使用axios简单封装用法,axios报错the request was rejected because no multipart boundar
Gitlab配置webhook报错:Urlis blocked: Requests to the local network are not allowed解决
Ajax使用formdata异步上传文件,报错the request was rejected because no multipart boundary was found