Changing the root path in nginx for a FastCGI/php-fpm app


I have a Snipe-IT container setup using the image. It works flawlessly when the nginx root path is configured as /. I have a subdomain using which I am configuring the APP_URL and the NGINX_APP_URL e.g.

However, I have a single subdomain and I am using it to run other services as well that are collectively reverse proxied using an nginx service that works in a separate container. For this reason, I want to serve Snipe-IT from a path that goes and I am trying to configure the Snipe-IT container to make this change (in nginx).

I see that there is an init script that changes nginx’s server_name configuration using sed from a placeholder to the value in the environment variables mentioned above.

Is there a way I can change nginx’s location configurations without getting into trouble with FastCGI and php-fpm?