我有一个奇怪的问题,我最近把我的网站搬到了一个新的数字海洋服务器上。
它是用Nginx安装的,在Nginx配置中有标准的锁定,以阻止外部人员在wp admin中执行PHP文件。
一切似乎都是百分之百的,除了我的编辑不能再编辑文章,但它对管理员来说是百分之百的有效。我的web控制台或nginx错误日志中没有错误,并且在监视网络连接时没有拒绝任何内容。
当编辑器试图编辑可视化编辑器时,它只是一个空白,可以看到html视图,但编辑器无法添加标记,类别无法安排甚至保存更改。
我发现的唯一一件事是,作为编辑编辑时没有打这个电话
[MyDomain]/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,jquery-ui-draggable,jquery-touch-punch,iris,wp-color-picker,admin-bar,thickbox,heartbeat,autosave,wp-ajax-res&load%5B%5D=ponse,jquery-color,wp-lists,jquery-query,admin-comments,suggest,postbox,tags-suggest,tags-box,word-count,post,editor-expand,shor&load%5B%5D=tcode,media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,svg-painter,wp-auth-check,media-upload,jquery-ui-datepicke&load%5B%5D=r,editor,wplink,wp-embed&ver=4.7.2
该错误发生在元框中的此行上。php
<script type="text/javascript">jQuery(document).ready(function(){commentsBox.get(2, 10);});</script>
如果我硬编码调用以加载脚本。php它越过了错误,但在另一次调用中失败,并且不断失败。
这是我的nginx配置,我认为是它导致了这个问题?
# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $skip_cache 1;
}
if ($query_string != "") {
set $skip_cache 1;
}
# Don\'t cache uris containing the following segments
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
# Don\'t use the cache for logged in users or recent commenters
if ($http_cookie ~* "wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \\.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 60m;
}
location ~ /purge(/.*) {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
location ~* ^.+\\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}
location = /robots.txt { access_log off; log_not_found off; }
location ~ /\\. { deny all; access_log off; log_not_found off; }
location ~ /\\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
# Stop php access except to needed files in wp-includes
location ~* ^/wp-includes/.*(?<!(js/tinymce/wp-tinymce))\\.php$ {
internal;
}
# no access to wp-config.php
location = /wp-config.php {
deny all;
}
# no access to php files inside an uploads or files folder
location ~* /(?:uploads|files)/.*\\.php$ {
deny all;
}
# no access to files inside wp-content with various types
location ~* ^/wp-content/.*\\.(txt|md|exe|sh|bak|inc|php|pot|po|mo|log|sql)$ {
deny all;
}
# no access to root folder, .htaccess, or .svn files or folders
location ~ /\\.(ht|svn)? {
deny all;
}
我被难住了,希望一些天才能指出我需要改变什么,