Nginx Configuration for Bedrock

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.

1 Like

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.

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?

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

1 Like

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

Welcome @Ciaran . We may add that in the future. In the meantime, please do feel free to submit a feature request.

1 Like

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.

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.