apache2 is throwing internal server error 500 after AllowOverride All, localhost

2.7k Views Asked by At

i am new in configuring server. For now, i have to configure localhost with LAMP and opencart framework. But still it is throwing internal server error 500.

Even I have tried the following things

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

/etc/apache2/sites-available/000-default.conf file

    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)
1

There are 1 best solutions below

1
On BEST ANSWER

After checking the logs, i have found invalid parameters headers. Therfore for this we have to this:

sudo a2enmode headers