redirection – How to direct Drupal from server IP to URL with path?

I’m working on a Drupal site, that is deployed on a webserver. Everything works if in the browser I use the IP address to connect to the site. My supervisor made an Nginx redirection on another server to the site’s IP. Now the site should be accessible from example.com/services/drupal but it isn’t.

I have tried modifying settings.php file with following lines:

$base_url = 'example.com/services/drupal';
$settings['trusted_host_patterns'] = [
    '^example.com$',
    '^example.com/services/drupal$',
    '^example.com/services/drupal',
];
$base_path = 'services/drupal';

How could I get my site to work correctly on example.com/services/drupal?

I’m using Drupal 8.