I have a website hosted on Apache server and on Ubuntu machine. When the visitor type mydomain.com/index.html I would like to redirect it to the custom 404 page error.
So in the /etc/apache2/sites-available I edit the mydomain.com.conf file in the folling way:
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ErrorDocument 403 /custom_403.html
ErrorDocument 404 /custom_404.html
Redirect 404 /index.html
But now when I type www.mydomain.com the Apache doesn´t load neither the index.html nor the custom_404.html. Instead, it shows a folder structure with what I have in the DocumentRoot.
How can I achive my goal without this issue? Thanks