Basic configuration scheme to run Nginx over docker.
mkdir /etc/nginx
mkdir /var/www && mkdir /var/www/example.com
<-/www
is where your websites will staysudo chown www-data:$USER /var/www -R
cd /etc/nginx && git pull https://github.com/mury12/nginx-docker
- Set
.conf
file insideconf.d
with the right domain values - If you want to apply SSL, remove
example.com.conf
and renameexample.ssl
toexample.com.conf
. Notice that you'll need to manually place the key file paths in the.conf
file. docker-compose up -d
- To restart
docker-compose down && docker-compose up -d
For SSL configuration, follow
certbot certonly
instructions.