# Making Django oblivious of the subfolder it's running in

**URL:** <https://forum.djangoproject.com/t/making-django-oblivious-of-the-subfolder-its-running-in/3906>\
**Category:** Using Django\
**Created:** [August 15, 2020, 6:33pm UTC](https://forum.djangoproject.com/t/making-django-oblivious-of-the-subfolder-its-running-in/3906 "2020-08-15T18:33:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spidiffpaffpuff](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/spidiffpaffpuff/32/1557_2.png) [@Spidiffpaffpuff](https://forum.djangoproject.com/u/Spidiffpaffpuff)\
**Post date:** [August 15, 2020, 6:33pm UTC](https://forum.djangoproject.com/t/making-django-oblivious-of-the-subfolder-its-running-in/3906/1 "2020-08-15T18:33:01Z")

</div>

I’m running two django projects from the same server. The first instance runs at port 8000, the second one runs at 8010. My server is configured so that requests for [www.mywebhoster.com/test/](http://www.mywebhoster.com/test/) go to port 8000, requests for [www.mywebhoster.com/rbp\_website/](http://www.mywebhoster.com/rbp_website/) go to 8010. Now I want to make each instance of django oblivious of the fact that they are being run in subfolders. Otherwise I have to add “test/” or “rbp\_website/” in front of every entry in my urls.py. I’m very unexperienced with configuring servers, so any hints would be helpful.

Is this something that I do at the server level? Or is there a setting in Django that allows me to clarify this once?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [August 15, 2020, 7:28pm UTC](https://forum.djangoproject.com/t/making-django-oblivious-of-the-subfolder-its-running-in/3906/2 "2020-08-15T19:28:00Z")

</div>

Assuming that you’re running separate uwsgi containers for `test` and `rbp_website`, you handle this at the server / uwsgi layer.

In your uwsgi.ini file, add

```auto
mount = /test=test.wsgi:application
manage-script-name = true

```

This allows uwsgi to effectively strip off the initial `/test` from the referenced url within the application.

(Note, since nginx handles my static files directly, I do have separate static subdirectories in my nginx config pointing to the different directories. I don’t have uwsgi service static files.)

Ken
