fastcgi_intercept_errors on;
error_page 400 /error_pages/400.html;
error_page 401 /error_pages/40x.php?code=401;
error_page 402 /error_pages/40x.php?code=402;
error_page 403 /error_pages/40x.php?code=403;
error_page 404 /error_pages/404.php;
error_page 500 502 503 504 /error_pages/50x.html;
server {
listen 80;
set $root_path /home/bitrix/ext_www/site.o2k.ru;
set $php_sock unix:/run/php/php7.4-fpm.sock;
index index.php index.html index.htm;
server_name site.o2k.ru;
access_log /var/log/nginx/site.o2k.ru_access.log;
error_log /var/log/nginx/site.o2k.ru_error.log error;
include /etc/nginx/common.conf;
include fastcgi_params;
fastcgi_intercept_errors on;
error_page 400 /error_pages/400.html;
error_page 401 /error_pages/40x.php?code=401;
error_page 402 /error_pages/40x.php?code=402;
error_page 403 /error_pages/40x.php?code=403;
error_page 404 /error_pages/404.php;
error_page 500 502 503 504 /error_pages/50x.html;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass $php_sock;
}
}
systemctl restart nginx
location ^~ /local/api/ {
fastcgi_intercept_errors off;
include snippets/fastcgi-php.conf;
fastcgi_pass $php_sock;
}
server {
listen 80;
set $root_path /home/bitrix/ext_www/site.spryskov.o2k.ru;
set $php_sock unix:/run/php/php7.4-fpm.sock;
index index.php index.html index.htm;
server_name site.spryskov.o2k.ru;
access_log /var/log/nginx/site.spryskov.o2k.ru_access.log;
error_log /var/log/nginx/site.spryskov.o2k.ru_error.log error;
include /etc/nginx/common.conf;
include fastcgi_params;
fastcgi_intercept_errors on;
error_page 400 /error_pages/400.html;
error_page 401 /error_pages/40x.php?code=401;
error_page 402 /error_pages/40x.php?code=402;
error_page 403 /error_pages/40x.php?code=403;
error_page 404 /error_pages/404.php;
error_page 500 502 503 504 /error_pages/50x.html;
location ^~ /local/api/ {
fastcgi_intercept_errors off;
include snippets/fastcgi-php.conf;
fastcgi_pass $php_sock;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass $php_sock;
}
}
systemctl restart nginx