Fixed: Requested URL Was Not Found on this Server Apache2 Ubuntu 22.04
Jul 19, 2022 . Admin
Hi Guys
In this tutorial, you will learn Fixed: Requested URL Was Not Found on this Server Apache2 Ubuntu 22.04. I explained simply about Requested URL Was Not Found on This Server Apache2 Ubuntu 22.04. In this article, we will implement a How do you Fix Not Found the Requested URL was Not Found on This Server Apache 2.4 41 Ubuntu 22.04 Server at Localhost Port 80?. I explained simply step by step Do you Fix the Requested URL was Not Found on This Server in Ubuntu 22.04?.
You can use this post for ubuntu 14.04, ubuntu 16.04, ubuntu 18.4, ubuntu 20.04, ubuntu 21 and ubuntu 22.04 versions.
When you install Apache2 on a Linux server. At that time the mod_Rwrite module is not enabled by default on Apache 2.
Step 1: Update dependenciesIf you are not installed apache 2 in ubuntu.
sudo apt-get updateStep 2: Enable mod_rewrite Apache By a2enmod Command
Then type a2enmod command to enable any modules in Apache 2 web server:
sudo a2enmod rewriteStep 3: Allow .htaccess File for VirtualHost
This "AllowOverride All" needs to be added to your virtualhost configuration file.
sudo nano /etc/apache2/sites-available/000-default.conf
Then you need to add this “AllowOverride All” in your VirtualHost configuration file like below
<VirtualHost *:80> ServerName www.example.com DocumentRoot /var/www/html <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All </Directory> </VirtualHost>Step 4: Restart Apache 2
If you have follow above 3 steps successfully.
sudo systemctl restart apache2