2013-11-27 110 views
0

我在我的VPS上安裝了nginx,php5-fpm,memcache和wordpress。我收到了js和css文件的404錯誤。Nginx Fastcgi Wordpress 404未找到Js和Css文件的錯誤

錯誤;

[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" 

可能是什麼問題?

謝謝

回答

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> 

,而不是它的相對URL

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

在第二種情況下,你正在使用的一個相對URL加載文件

<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表以查看您設置了哪個URL。

+0

也許你是對的,但我沒有試過任何改變,我認爲問題是在post.php –