Skip to content

Instantly share code, notes, and snippets.

@saiberz
Last active February 12, 2017 00:24
Show Gist options
  • Save saiberz/ab710b2bcb3d1ff103a9e13f3e72b5bc to your computer and use it in GitHub Desktop.
Save saiberz/ab710b2bcb3d1ff103a9e13f3e72b5bc to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location ~ /.well-known {
allow all
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
version: '2'
services:
nginx:
image: nginx
volumes:
- ./:/etc/nginx/sites-available
- ./root:/usr/share/nginx/html
ports:
- "80:80"
- "443:443"
restart: always
touch docker-compose.yml
docker-compose.yml up -d
mkdir -p root
sudo letsencrypt certonly -a webroot --webroot-path=$(pwd)/root -d saiberz.com -d www.saiberz.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment