Step 2: Edit the configuration

Step 4: Restart nginx

After changing the configuration, restart your nginx container for changes to take effect.

docker restart nginx

or using Docker Compose:

docker-compose restart nginx

Reverse proxy to other containers

nginx can be used to reverse proxy to other containers using Docker's linking system. This isparticularly useful if you want to serve dynamic content through an nginx frontend. Bitnami providesexample virtual hosts for all of our runtime containers in /bitnami/nginx/conf/vhosts/.

To perform operations (e.g. logrotate) on the logs, mount the same directory in a container designedto operate on log files, such as logstash.

Maintenance

Backing up your container

To backup your configuration and logs, follow these simple steps:

Step 1: Stop the currently running container

docker stop nginx

or using Docker Compose:

docker-compose stop nginx

Step 2: Run the backup command

We need to mount two volumes in a container we will use to create the backup: a directory on yourhost to store the backup in, and the volumes from the container we just stopped so we can access thedata.