• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

mod_rewrite

Ubuntu 20.04 LTS Lamp Server

November 10, 2020

Here’s how to install a LAMP server on the latest Ubuntu 20.04 LTS.

Install Apache.

apt install apache2
systemctl status apache2
systemctl is-enabled apache2

apt install apache2 systemctl status apache2 systemctl is-enabled apache2

Install MariaDB.

apt install mariadb-server mariadb-client
systemctl status mariadb
systemctl is-enabled mariadb
mysql_secure_installation

apt install mariadb-server mariadb-client systemctl status mariadb systemctl is-enabled mariadb mysql_secure_installation

Install PHP.

apt install php libapache2-mod-php php-mysql
systemctl restart apache2

apt install php libapache2-mod-php php-mysql systemctl restart apache2

Enable ssl and mod_rewrite.

a2enmod ssl
a2enmod rewrite
systemctl restart apache2

a2enmod ssl a2enmod rewrite systemctl restart apache2

Filed Under: Linux Tagged With: apache, lamp, lts, mariadb, mod_rewrite, php, ssl, ubuntu 20.04

Enable Mod Rewrite in Ubuntu

August 8, 2014

Another issue when installing Laravel on the Ubuntu server is to make sure you have the mod_rewrite module enabled. You can turn it on by invoking the following command.

sudo a2enmod rewrite
sudo service apache2 reload

sudo a2enmod rewrite sudo service apache2 reload

Once you’ve enabled mod_rewrite, you need to restart Apache. That should fix any of the route issues that you may have. If mod_rewrite is disabled, you usually get 404 errors or file not found. The Laravel routes simply doesn’t work.

Filed Under: Linux, PHP Tagged With: mod_rewrite

  • Home
  • About
  • Archives

Copyright © 2023