Z
Z
zhdoon2018-03-11 07:51:08
Nginx
zhdoon, 2018-03-11 07:51:08

How to set up a 404 error on Bitrix (nginx + php-fpm)?

I built the server without Apache, nginx + php-fpm. 404 error works for infoblock elements and infoblock sections. The mechanism for processing 404 errors does not work for non-dynamic pages like https://domaim.ru/path/
How to configure?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Musin, 2018-03-11
@vmpartner

Error 404 is given by Bitrix itself in your template. The content of the error is in the 404.php file at the root.
To catch an error, you need to put a block:

location / {
    try_files $uri $uri/ @bitrix;
}

A
Andrey, 2018-03-11
@VELIK505

And what does a page like https://domaim.ru/path/ show ?
register it in the site config from nginx:

error_page 400 = https://domaim.ru/stranicaoshibki;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question