# Nginx Configuration for Bedrock

**URL:** https://community.kinsta.com/t/nginx-configuration-for-bedrock/201
**Category:** Application Support
**Created:** [January 21, 2021, 5:35pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201 "2021-01-21T17:35:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![mtsnk](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@mtsnk](https://community.kinsta.com/u/mtsnk)
#### Post date: [January 21, 2021, 5:35pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/1 "2021-01-21T17:35:35Z")

</div>

Is there a way to change the document root folder? I believe this would be an Nginx configuration made via the container, but I’m not familiar with Docker.

The following link shows the changes required to run Roots Bedrock.

[https://roots.io/docs/bedrock/master/server-configuration/#nginx-configuration-for-bedrock](https://roots.io/docs/bedrock/master/server-configuration/#nginx-configuration-for-bedrock)

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [January 21, 2021, 6:02pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/2 "2021-01-21T18:02:23Z")

</div>

Hi @mtsnk . Welcome to DevKinsta!

You can edit NGINX configuration via `docker exec -it devkinsta_nginx bash`. You’ll find `.conf` files contained within `/etc/nginx/sites` where you can change the root directory for those sites. You may need to install your favorite editor as well, like `apt-get install nano` if you plan to edit those in the terminal.

---

<div class="post-metadata">

### Author: ![Ciaran](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@Ciaran](https://community.kinsta.com/u/Ciaran)
#### Post date: [January 22, 2021, 1:54am UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/3 "2021-01-22T01:54:11Z")

</div>

I’m new to using Docker for Wordpress development & use the bedrock folder structure. Will there be an easier way in the future to modify the Nginx config file or the only option will be to install nano editor on to the Docker image?

---

<div class="post-metadata">

### Author: ![mtsnk](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@mtsnk](https://community.kinsta.com/u/mtsnk)
#### Post date: [January 22, 2021, 9:15am UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/4 "2021-01-22T09:15:04Z")

</div>

Great, thanks! I will add this to feature request board. It would be great if this could be done using the DevKinsta GUI. @Ciaran

---

<div class="post-metadata">

### Author: ![Ciaran](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@Ciaran](https://community.kinsta.com/u/Ciaran)
#### Post date: [January 22, 2021, 2:28pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/5 "2021-01-22T14:28:22Z")

</div>

Great, thank you! Hopefully it becomes a feature in the near future.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [January 22, 2021, 4:27pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/6 "2021-01-22T16:27:57Z")

</div>

Welcome @Ciaran . We may add that in the future. In the meantime, [please do feel free to submit a feature request](https://community.kinsta.com/c/feature-requests/6).

---

<div class="post-metadata">

### Author: ![mtsnk](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@mtsnk](https://community.kinsta.com/u/mtsnk)
#### Post date: [January 25, 2021, 9:36am UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/7 "2021-01-25T09:36:32Z")

</div>

When make these edits to the conf file, I am not seeing what is expected in my browser. I restart Nginx using docker and my changes have been reverted. I can confirm that my changes are only undone when I restart Nginx.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [January 26, 2021, 4:49pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/8 "2021-01-26T16:49:47Z")

</div>

I’m sorry for the issues here. Restarting the container will indeed revert those changes. As a temporary workaround to prevent those changes from reverting, only restart nginx from within the container. We may change this in the future to prevent changes from reverting or make it possible to customize.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 3, 2021, 4:38pm UTC](https://community.kinsta.com/t/nginx-configuration-for-bedrock/201/9 "2021-03-03T16:38:53Z")

</div>


