Update NGINX.md

Improve order
This commit is contained in:
Ashley Rich 2019-04-12 20:48:24 +01:00 committed by GitHub
parent d9e59efd63
commit c084d99e5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -19,7 +19,13 @@ server {
}
```
If you wish to protect your site using a [Let's Encrypt](https://letsencrypt.org/) HTTPS certificate, you can do so using the [Certbot webroot plugin](https://certbot.eff.org/docs/using.html#webroot). Your `/etc/nginx/sites-enabled/yourfathom.com` file should be updated accordingly:
If you wish to protect your site using a [Let's Encrypt](https://letsencrypt.org/) HTTPS certificate, you can do so using the [Certbot webroot plugin](https://certbot.eff.org/docs/using.html#webroot).
```
certbot certonly --webroot --webroot-path /var/www/yourfathom.com -d yourfathom.com
```
Your `/etc/nginx/sites-enabled/yourfathom.com` file should be updated accordingly:
```
server {
@ -46,10 +52,6 @@ server {
The `alias` directive should point to the location where your `--webroot-path` is specified when generating the certificate (with `/.well-known` appended).
```
certbot certonly --webroot --webroot-path /var/www/yourfathom.com -d yourfathom.com
```
### Test NGINX configuration
```
sudo nginx -t