2009-11-22 45 views
0

我在ubuntu盒子上安裝了可移動類型。 管理部分效果很好。 但是,首頁沒有。圖像和CSS不顯示。 這是Apache錯誤日誌來:不顯示可移動類型圖像

Permission denied: exec of '/var/www/mt/example/styles.css' failed 
Premature end of script headers: styles.css 

我認爲這是關係到我的Apache配置。由於我使用localhost調用管理部分,但是我使用example.com作爲頭版,這是不起作用的部分。 這是我的Apache配置:

NameVirtualHost * 
<VirtualHost *> 
     ServerAdmin [email protected] 
     ServerName mt.example.net 
     DocumentRoot /var/www/mt 

     Alias /mt-static /var/www/mt/mt-static 
     <Directory /var/www/mt/mt-static> 
       Options Indexes FollowSymLinks MultiViews 
       AllowOverride All 
       Order allow,deny 
       allow from all 
     </Directory> 

     ScriptAlias//var/www/mt/ 
     <Directory /var/www/mt> 
       AllowOverride None 
       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
       Order allow,deny 
       Allow from all 
     </Directory> 
</VirtualHost> 

<VirtualHost *> 
     ServerAdmin [email protected] 
     ServerName example.com 
     ServerAlias example.com www. example.com 
     DocumentRoot /var/www/example 

     Alias /mt-static /var/www/mt/mt-static 
     <Directory /var/www/mt/mt-static> 
       Options Indexes FollowSymLinks MultiViews 
       AllowOverride All 
       Order allow,deny 
       allow from all 
     </Directory> 
     Redirect /mt.cgi http://mt.example.net/mt.cgi 
</VirtualHost> 

回答

0

這聽起來像阿帕奇試圖運行.css文件作爲一個可執行文件。我可以建議的唯一的事情是,您可能有一個具有可執行權限的css文件,出於某種原因,所以Apache會嘗試執行它。嘗試

chmod a-x 

關於CSS文件,看看它是否有所作爲。

有時從Windows複製的文件具有可執行集時,他們不應該。

+0

不,對不起,沒有工作:( – R0b0tn1k 2009-11-23 08:09:17

1

,因爲那裏的CSS文件所在的目錄(var/www/mt/example/)是一個與選項+ExecCGI

目錄繼承父母

的選項的子目錄被宣佈爲( /var/www/mt)的腳本