Register Now


Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask a question.


Register Now

Lorem ipsum dolor sit amet, consectetur adipiscing elit.Morbi adipiscing gravdio, sit amet suscipit risus ultrices eu.Fusce viverra neque at purus laoreet consequa.Vivamus vulputate posuere nisl quis consequat.

Not Found The requested URL was not found on this server.

Ubuntu Apache 2 – Not Found The requested URL was not found on this server.

Ubuntu Apache 2 on WordPress – Not Found The requested URL was not found on this server.

Explanation: Here are a few things to try to fix the “Not Found The requested URL was not found on this server” error in Apache on Ubuntu:

1. Check that the Apache service is running:

sudo systemctl status apache2

2. Make sure the required modules are enabled (like mod_rewrite):

sudo a2enmod rewrite

3. Check the Apache configuration files for errors:

sudo apache2ctl configtest

4. Make sure the directory/file you are accessing actually exists and has the right permissions.

5. If you are using WordPress add the following to .htaccess in public folder.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

6. Mod_rewrite Configuration.
If you are using mod_rewrite for URL rewriting, make sure it is enabled and configured correctly in your virtual host file.
Replace below code

<Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted


<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted

7. Check the Apache access and error logs for more details on the 404 error:


8. Restart Apache after any configuration changes:

sudo systemctl restart apache2

If the issue persists, enable debug logging and check those logs. Also try accessing the server locally to narrow down connectivity issues.

Let me know if you have any other specific details on the error – happy to help further troubleshoot!

ALSO READ  Besides cost optimization, when would using SQS in between make the most sense?

About Abhay Singh

I'm Abhay Singh, an Architect with 9 Years of It experience. AWS Certified Solutions Architect.

Follow Me

Leave a reply