2013-10-09 55 views
5

我有我的Web應用程序項目位於/ media/disk1/Projects文件夾中。我想用http://lab/上的Apache虛擬主機來爲他們提供服務。我的虛擬主機上的Apache 500內部服務器錯誤

這是我建立了我的虛擬主機:

1複製的/ etc/apache2的/網站可用/默認到/ etc/apache2的/網站可用/實驗室

2編着的/ etc/apache2的/網站可用/實驗室以下幾點:

<VirtualHost *:80> 
ServerAdmin [email protected] 
ServerName lab 

DocumentRoot /media/disk1/Projects 
<Directory /> 
    Options FollowSymLinks 
    AllowOverride None 
</Directory> 
# <Directory /var/www/> 
<Directory /media/disk1/Projects> 
    Require all granted 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    Order allow,deny 
    allow from all 
</Directory> 

3.添加127.0.0.1 lab我的/ etc/hosts文件:

127.0.0.1 localhost 
127.0.0.1 lab 

4.訪問的http://lab只拿到500 Internal Server Error

所有子文件夾的權限設置爲drwxrwxrwx 但我http://lab/phpmyadmin作品。

幫我解決。謝謝。

+1

你的錯誤日誌說什麼? –

+0

太多了。在這裏,我剛剛上傳我的/var/log/apache2/error.log http://goo.gl/DSjhEf – TechyTimo

+0

這裏是我的/var/log/apache2/access.log http://goo.gl/IuXT9a – TechyTimo

回答

27

錯誤通過檢查此論壇解決; http://boinc.berkeley.edu/dev/forum_thread.php?id=8603 在我/var/log/apache2/error.log的最後一個錯誤是:

[Wed Oct 09 09:10:04 2013] [crit] [client 127.0.0.1] configuration error: couldn't perform authentication. AuthType not set!:/

所以我跟着別人的解決方案,只是在我的/ etc註釋行

# Require all granted 

/apache2/sites-available/lab和TADA!我能夠在我的瀏覽器中列出我的Projects目錄。

+0

這就是解決問題的正確答案。謝謝! – ken

+0

雖然我無法解釋爲什麼固定我的太多! –

+2

評論該行使我的錯誤轉換爲403禁止,顯然它並不總是多餘的。 – Deleet