# Empty basePath in nginx

**URL:** <https://discourse.slimframework.com/t/empty-basepath-in-nginx/412>\
**Category:** Questions\
**Created:** [June 19, 2016, 2:43pm UTC](https://discourse.slimframework.com/t/empty-basepath-in-nginx/412 "2016-06-19T14:43:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@victor](https://discourse.slimframework.com/u/victor)\
**Post date:** [June 19, 2016, 2:43pm UTC](https://discourse.slimframework.com/t/empty-basepath-in-nginx/412/1 "2016-06-19T14:43:22Z")

</div>

Hi,

I don’t know if i’m doing something wrong (sure i’m doing something wrong).  
In my development server I have nginx with standard configuration. This works pointing to my /var/projects/ folder and i can load projects directly from subfolder:

```
http://my-dev-domain.dev/project1

```

But recently i have new project with views and i was added special config to nginx to do slim 3 work correctly in subfolder:

```
location /project2 {
    try_files $uri $uri/ /project2/index.php$is_args$args;
 }

```

My first one problem I found is routes, i need to add group with root subfolder because Slim 3 don’t found routes without them:

```
$app->group('/project2', function(){ //without this line routes isn't found
    $this->map(['GET', 'POST', 'PUT'], '/events[/{id}]', App\Actions\EventsAction::class)->setName('events');
});

```

Second problem is Slim\Http\Uri object have basePath empty. I like to use basePath for generate urls in Views.

Anyone with similar behavior?  
Thanks
