на одном хосте, в конфиге вот такое:
root /var/www/s.test/backend/web;
server_name s.test;
location ~ ^/(auth|api) {
index index.php;
alias /var/www/s.test/backend/web;
if (!-e $request_filename){
rewrite ^/(.*) /index.php?r=$1 last;
}
}
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param REQUEST_URI $uri?$args;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
fastcgi_param REQUEST_URI $uri?$args;
Обсуждают сегодня