Memperbaiki error "the requested URL not found on this server" Apache Linux

Tampilan error 404 Not Found pada server Apache Ubuntu dengan pesan "The requested URL was not found on this server" di localhost.

Ketika kali pertama menjadikan Linux dan Apache sebagai web server biasanya kita akan menjumpai error “the requested url not found on this server”.

Berikut cara mengatasi masalah error not found pada Apache Linux:

sudo su
sudoedit /etc/apache2/apache2.conf
<Directory /var/www/>
   Options Indexes FollowSymLinks
   AllowOverride none
   Require all granted
</Directory>
<Directory /var/www/>
   Options Indexes FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>
sudo systemctl restart apache2.service

Setelah melakukan langkah-langkah di atas, aktifkan modul mod_rewrite pada Apache:

sudo a2enmod rewrite
sudo systemctl restart apache2.service

Silakan refresh browser dan lihat apakah ada error atau tidak. Jika tidak ada error dan URL bisa diakses dengan normal, berarti kita sudah berhasil mengatasi masalah URL not found pada Apache server.