2016-01-29 138 views
1

後拋出內部服務器錯誤500我是新配置服務器。現在,我必須配置LAMP和opencart框架的本地主機。但它畢竟是引發內部服務器錯誤500apache2在AllowOverride All,localhost

即使我曾嘗試下面的東西

sudo a2enmode rewrite 
apache2ctl configtest // for syantax 
apache2ctl -t // for syntax 

/etc/apache2/sites-available/000-default.conf文件

ServerName localhost 

    ServerAdmin [email protected] 
    DocumentRoot /var/www/ 
    <Directory "/var/www/"> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride All 
      Order allow,deny 
      allow from all 
    </Directory> 

/etc/apache2/apache2.conf中

<Directory /> 
    Options FollowSymLinks 
    AllowOverride None 
    Require all denied 
</Directory> 

<Directory /usr/share> 
    AllowOverride None 
    Require all granted 
</Directory> 

<Directory /var/www/> 
    Options Indexes FollowSymLinks 
    AllowOverride All 
    Require all granted 
</Directory> 

/var/www/opencart/.htaccess

Options +FollowSymLinks 
Header add Access-Control-Allow-Origin "*" 
RewriteEngine On 
RewriteBase /ot 
RewriteCond $1 !^(robots\.txt) 

回答

4

檢查日誌後,我發現無效的參數標題。因此,我們必須這樣做:

sudo a2enmode headers 
相關問題