view .nginx.conf @ 1:1d486627aa1e draft default tip

24.10
author Coffee CMS <info@coffee-cms.ru>
date Sat, 12 Oct 2024 02:51:39 +0000
parents 78edf6b517a0
children
line wrap: on
line source

# Минимальный конфигурационный файл для nginx
# Больше опций https://coffee-cms.ru/nastroyka-nginx-dlya-coffee-cms
server {
    server_name nginx.coffee-cms.ru;
    listen 80;
    root /var/www/nginx.coffee-cms.ru/html;
    location / {
        index index.html /.cms/index.php;
        # чтобы страницы не скачивались как файлы:
        default_type text/html;
        try_files $uri $uri/ /.cms/index.php?$query_string;
    }
    location ~ \.php(/|$) {
        try_files $uri $uri/ /.cms/index.php?$query_string;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        fastcgi_buffering off;
        fastcgi_request_buffering off;
        fastcgi_index index.php;
        include fastcgi.conf;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        expires off;
    }
}