Answer the question
In order to leave comments, you need to log in
Can I set the default 404 error page for the entire server?
In case the site I have on the server does not have the appropriate directive for the error.
Accordingly, for other types of errors.
I have an Apache2 web server. I tried to solve the problem myself, but there were difficulties.
If you write the following directive in the conf.file with the public file error.php:
<Directory "/var/www/example.ru/public_html">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
ErrorDocument 404 example.ru/error.php
</Directory>
<Directory "/var/www/example.ru/public_html">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
ErrorDocument 404 /var/www/error.php
</Directory>
Answer the question
In order to leave comments, you need to log in
Error on the way, no?
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Similar problem.
If you make an .htaccess file in a subfolder of the site and do not explicitly write the path to 404 or 403 or some other error in it *full path to the error page) then we get an error Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
If the path is written in full, then the error page opens as it should.
It turns out that you need to prescribe the full path in each folder or something to make it work ???
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question