Установил на чистый сервер LEMP по инструкции:
https://www.digitalocean.com/community/tutorials/l...
Перенёс с sepverpilot ( Другого сервера ) Файлы Kirby CMS
pg.site.com <- Вот что получилось, все мои попытки конфигурировать NGINX не увенчались успехом.
Сейчас у меня такие настройки:
server {
listen 80;
listen [::]:80;
root /var/www/pg.site.com/public;
index index.php index.html index.htm;
server_name pg.site.com www.pg.site.com;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
# include snippets/fastcgi-php.conf;
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Объясните пожалуйста как все настроить?
Upd:
Решил всё в итоге так:
Для кирби настроил nginx
server {
listen 80;
listen [::]:80;
root /var/www/pg.whata.ninja/public;
index index.php index.html index.htm;
server_name pg.site.com www.pg.site.com;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
#location / {
# try_files $uri $uri/ =404;
#}
location ~ /\.ht {
deny all;
}
##############################
## Kirby configuration
##############################
# Don't hint these as folders
rewrite ^/(content|site|kirby)$ /error last;
# block content
rewrite ^/content/(.*).(txt|md|mdown)$ /error last;
# block all files in the site and kirby folder from being accessed directly
rewrite ^/(site|kirby)/(.*)$ /error last;
# removes trailing slashes (prevents SEO duplicate content issues)
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
# panel links
location ~ /panel {
try_files $uri $uri/ /panel/index.php?$uri&$args;
}
# site links
location ~ / {
try_files $uri $uri/ /index.php?$uri&$args;
}
# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
location ~ (?:^|/)\. {
deny all;
}
# Prevent clients from accessing to backup/config/source files
location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ {
deny all;
}
##############################
## End Kirby CMS configuration
##############################
}
В php.ini прописал
short_open_tag = On
И установил php7.0-mbstring