Wednesday, October 19, 2022

Enable Htaccess for Linux Server

Run Command

sudo a2enmod rewrite 


Restart apache

sudo systemctl restart apache2


Edit Apache config file

sudo nano/etc/apache2/sites-available/000-default.conf


Put this code 

<VirtualHost *:80>

    <Directory /var/www/html>

        Options Indexes FollowSymLinks

        AllowOverride All

        Require all granted

    </Directory>

    

    . . .

</VirtualHost>


Restart Apache

No comments:

Post a Comment