小弟裝的是Debian etch
php version:PHP Version 4.4.4-8+etch4
apache version:Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/4.4.4-8+etch4 mod_perl/2.0.2 Perl/v5.8.8
問題描述:
首面無法顯示畫面(一片空白),但是「檢視原始碼」時可以發現網頁的原始碼,請問這是cgi的問題嗎?(因為首頁會呼叫一個cgi檔,我直接執行那個cgi檔也是一片空白畫面),還是我apache2的設定問題?
嘗試:
1.AddHandler cgi 設定打開 ==> 無效
2.a2enmod cgi and a2enmod perl ==>皆已開啟
3./usr/lib/cgi-bin/Cgi 目錄至少有755 以上的權限
/etc/apache2/site-avaiable/default設定:
******************************
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
*****************************