i have message error : Not Found The requested URL was not found on this server.

hello , i have this message error on my site and i try to solve it but no way i can’t : Not Found The requested URL was not found on this server. this is my /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
Redirect permanent /
ServerAdmin webmaster@localhost
Alias /static /var/www/static-root
<Directory /var/www/static-root>
Require all granted
Alias /media /var/www/media-root
<Directory /var/www/media-root>
Order deny,allow
Allow from all
<Directory /var/www/venv/src/myproject >
        Require all granted
WSGIDaemonProcess myproject python-path=/var/www/venv/src/:/var/www/venv/lib/python3.5/site-packages
WSGIProcessGroup myproject 
WSGIScriptAlias / /var/www/venv/src/myproject /
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

so can anyone help me please

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


It sounds like that the Apache Mod Rewrite is not enabled.

In order to enable it, you could use the following command:

sudo a2enmod rewrite

You might also have to restart Apache after that:

sudo systemctl restart apache2

For more information on how to use the module you could take a look at this tutorial here:

Let me know how it goes. Best, Bobby