【问题标题】:apache2 is throwing internal server error 500 after AllowOverride All, localhostapache2 在 AllowOverride All, localhost 后抛出内部服务器错误 500
【发布时间】:2016-01-29 06:55:24
【问题描述】:

我是配置服务器的新手。现在,我必须使用 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)

【问题讨论】:

    标签: apache apache2 lamp ubuntu-15.10


    【解决方案1】:

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

    sudo a2enmode headers
    

    【讨论】:

      猜你喜欢
      • 2017-11-10
      • 1970-01-01
      • 2016-08-31
      • 2014-10-31
      • 2011-08-08
      • 2015-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多