Level 5
something like this. 4 location ~ \.php get recommended config
http://mysite.com run /var/www/mysite.com/react/build/index.html
http://mysite.com/laravel run /var/www/mysite.com/laravel/public/index.php
server {
listen 80;
server_name mysite.com;
set $root /var/www/mysite.com;
index index.php;
...
location / {
root $root/react/build;
index index.html;
}
location /laravel {
root $root/laravel/public;
try_files $uri $uri/ /index.php?query_string;
}
location ~ \.php {
fastcgi_pass unix:/var/run/php/php-fpm.sock;
...
}
}