Fix incorrect nginx/certbot instructions in README

This commit is contained in:
wiz 2019-12-01 11:50:14 +09:00
parent b13e819933
commit 12139fac3a
No known key found for this signature in database
GPG Key ID: A394E332255A6173
2 changed files with 27 additions and 19 deletions

View File

@ -148,14 +148,22 @@ When it's ready you will see output like this:
```
## nginx + CertBot (LetsEncrypt)
Setup nginx using the supplied nginx.conf, replacing `example.com` with your domain name.
Setup nginx using the supplied nginx.conf
```bash
# install nginx and certbot
apt-get install -y nginx python-certbot-nginx
# replace example.com with your domain name
certbot --nginx -d example.com
# install the mempool configuration for nginx
cp nginx.conf /etc/nginx/nginx.conf
certbot -d example.com # replace with your domain name
# edit the installed nginx.conf, and replace all
# instances of example.com with your domain name
```
Make sure you can access https://example.com/ in browser before proceeding
Make sure you can access https://<your-domain-name>/ in browser before proceeding
## Running (Frontend)

View File

@ -37,22 +37,22 @@ http {
listen [::]:80;
server_name example.com;
# if ($host = example.com) {
# return 301 https://$host$request_uri;
# } # managed by Certbot
#
# return 404; # managed by Certbot
# }
#
# server {
# listen [::]:443 ssl http2; # managed by Certbot
# listen 443 ssl http2; # managed by Certbot
# ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
# ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
#
# server_name example.com; # managed by Certbot
if ($host = example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
return 404; # managed by Certbot
}
server {
listen [::]:443 ssl http2; # managed by Certbot
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
server_name example.com; # managed by Certbot
index index.html;
root /var/www/html;