I run an Angular app rendered from a Symfony controller. My symfony application is based on http://localhost/portal
and has a route on http://localhost/portal/shop/
(wich renders the Angular app).
My current nginx configuration works well for this url.
When I reach http://localhost/portal/shop/.*
I want that nginx runs the Symfony app on the controller http://localhost/portal/shop/
and let the rest of the uri be handled by Angular routing.
My nginx knowledge are limited. Is that possible ? If yes, how can it be achieved?
My current location to handle /portal/shop
is :
location /portal {
root $projectroot/portal/web;
rewrite ^/portal/?(.*)$ /app_dev.php/$1 break;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $projectroot/portal/web/$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
}
Let me know if you need more of my config file. It's pretty big as it also handle an api section ;-)
Thank you for your help!