Jgin和Css文件的Nginx Fastcgi Wordpress 404未找到错误

时间:2013-11-27 21:18:23

标签: wordpress nginx fastcgi

我在我的VPS上安装了nginx,php5-fpm,memcache和wordpress。我收到了js和css文件的404错误。

错误;

[error] 21795#0: *35355 open() "/var/www/example.com/public_html/var/www/example.com/public_html/wp-content/themes/example/includes/classes/meta-box/js/color.js" failed (2: No such file or directory), client: 88.243.124.30, server: www.example.com, request: "GET /var/www/example.com/public_html/wp-content/themes/example/includes/classes/meta-box/js/color.js?ver=4.1.1 HTTP/1.1", host: "www.example.com", referrer: "http://www.example.com/wp-admin/post.php?post=1&action=edit&message=1"
[error] 19044#0: *13800 open() "/var/www/example.com/public_html/ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js" failed (2: No such file or directory), client: 101.226.33.206, server: www.example.com, request: "GET //ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js HTTP/1.1", host: "www.example.com", referrer: "http://www.example.com//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"

可能是什么问题?

由于

1 个答案:

答案 0 :(得分:0)

在第一种情况下,您尝试按其绝对路径加载文件。你有的地方

<script src="/var/www/example.com/public_html/wp-content/themes/example/includes/classes/meta-box/js/color.js?ver=4.1.1"><script>

而不是相对网址

<script src="/wp-content/themes/example/includes/classes/meta-box/js/color.js?ver=4.1.1"><script>

在第二种情况下,您尝试通过相对网址加载文件

<script src="/ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"><script>

而不是使用绝对的

 <script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js"><script>

我不知道为什么会这样,但你应该重新检查你的wp_options表,看看你设置了什么网址。