1

我是配置服务器的新手。现在,我必须使用 LAMP 和 opencart 框架配置 localhost。但它仍然抛出内部服务器错误 500。

即使我尝试过以下事情

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

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

    ServerName localhost

    ServerAdmin webmaster@localhost
    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

1 回答 1

4

检查日志后,我发现无效的参数标头。因此,我们必须这样做:

sudo a2enmode headers
于 2016-01-30T05:24:53.820 回答