listen 80;
server_name keys.margindev.ru;
location / {
alias /var/www/margin/www/public;
proxy_cache_valid 200 60m;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3200;
}
location /core/ {
alias /var/www/margin/www/core;
try_files $uri $uri/ /index.php?$query_string;
location ~ [^/]\.php(/|$) {
# split path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
set $_fastcgi_path_info $fastcgi_path_info;
# 404
try_files $fastcgi_script_name =404;
# default fastcgi_params
include fastcgi_params;
# fastcgi settings
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PATH_INFO $_fastcgi_path_info;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
fastcgi_param PHP_VALUE "short_open_tag=on";
}
}
}
что такое $realpath_root ?
Хочу разделить бэк (php) и фронт (node), как лучше это сделать?
Обсуждают сегодня