# Nginx location alias

**URL:** <https://discourse.slimframework.com/t/nginx-location-alias/3601>\
**Category:** Questions\
**Created:** [October 31, 2019, 8:23am UTC](https://discourse.slimframework.com/t/nginx-location-alias/3601 "2019-10-31T08:23:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jumpa](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@Jumpa](https://discourse.slimframework.com/u/Jumpa)\
**Post date:** [October 31, 2019, 8:23am UTC](https://discourse.slimframework.com/t/nginx-location-alias/3601/1 "2019-10-31T08:23:55Z")

</div>

Visiting [https://mysite.local/v3.0](https://mysite.local/v3.0) I’d like to serve folder /projects/src where Slim is. Now: nginx keeps appending v3.0 to the internal path. How can I avoid this? I’ve tried using alias:

```auto
server {
    listen 80;
    index index.php index.html;
    server_name mysite.local;
    root /projects/src;

    location /v3.0/ {
        alias /projects/src;
        try_files $uri /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass php:9000;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }
}

```

But this is not working as expected:

```auto
[error] 7#7: *3 open() "/projects/src/v3.0" failed (2: No such file or directory)

```

Could you please help me with this configuration for Slim (using version 3). Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![pedropereira](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/pedropereira/32/982_2.png) [@pedropereira](https://discourse.slimframework.com/u/pedropereira)\
**Post date:** [October 31, 2019, 10:41am UTC](https://discourse.slimframework.com/t/nginx-location-alias/3601/2 "2019-10-31T10:41:13Z")

</div>

Hi 🙂

I’m not an expert but I would start by removing that “irregular” dot pattern on your path versioning to see if it helps. Replacing 3.0 by 3.

Dots on paths are normally an indication of a file not a path segment/directory.
