fix instructions for editing nginx configuration so that a snakeoil cert is used

This commit is contained in:
KTachibanaM 2023-07-06 21:23:12 -07:00
parent a61403023a
commit 62b1541a02
2 changed files with 22 additions and 2 deletions

View File

@ -190,7 +190,17 @@ cp /home/mastodon/live/dist/nginx.conf /etc/nginx/sites-available/mastodon
ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
```
Then edit `/etc/nginx/sites-available/mastodon` to replace `example.com` with your own domain name, and make any other adjustments you might need.
Then edit `/etc/nginx/sites-available/mastodon` to
1. Replace `example.com` with your own domain name
2. Uncomment the `ssl_certificate` and `ssl_certificate_key` lines and replace the two lines with (ignore this step if you are bringing your own certificate)
```
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
```
3. Make any other adjustments you might need.
Reload nginx for the changes to take effect:

View File

@ -179,7 +179,17 @@ cp /home/mastodon/live/dist/nginx.conf /etc/nginx/sites-available/mastodon
ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
```
编辑 `/etc/nginx/sites-available/mastodon`,替换 `example.com` 为你自己的域名,你可以根据自己的需求做出其它的一些调整。
编辑 `/etc/nginx/sites-available/mastodon`
1. 替换 `example.com` 为你自己的域名
2. 启用 `ssl_certificate``ssl_certificate_key` 这两行,并把它们替换成如下两行(如果你使用自己的证书的话则可以忽略这一步)
```
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
```
3. 你还可以根据自己的需求做出其它的一些调整。
重载 nginx 以使变更生效: