日安!
我已经用我的域名尝试了一段时间了!我从来不知道让我们加密速率限制,所以我把事情搞得一团糟,反复安装和卸载,直到我不能从让我们加密再次获得另一个SSL!
我现在正在尝试重新安装并真正使用它,但是让我们加密不会给我颁发另一个SSL证书。我已经等了好几天了,他们还是不给我!
我设法手动从ZeroSSL获得了SSL证书,但由于我不熟悉Nginx和SSL证书,所以无法安装它!!
我尝试手动安装acme.sh,并将默认服务器设置为ZeroSSL,但每当我运行ghost setup SSL时,它仍然使用Let's Encrypt!
我正在考虑像steptzi.com.ng.conf一样在/etc/nginx/sites-enabled中手动创建一个配置文件,并链接我手动获得的配置文件!!
这里的任何人都可以向我解释如何使用ZeroSSL或acme.sh为我的域名的WWW和非WWW版本配置SSL证书
Ghost config.production.json
{
"url": "https://steptzi.com.ng",
"server": {
"port": 2368,
"host": "127.0.0.1"
},
"database": {
"client": "mysql",
"connection": {
"host": "localhost",
"user": "ghost-39",
"password": "3qQ&7\"lA:Oo^,OanH:MH",
"database": "ghost_prod"
}
},
"mail": {
"transport": "Direct"
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/var/www/ghost/content"
}
}steptzi.com.ng.conf
server {
listen 80;
listen [::]:80;
server_name steptzi.com.ng;
root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}发布于 2021-11-30 00:36:28
好了,我想通了!
步骤:
下载证书后,您应该有一个包含以下证书文件的ZIP:
certificate.crt
ca_bundle.crt
private.keySSL解压缩文件并将其上传到服务器可能是通过FileZilla
cat certificate.crt ca_bundle.crt >> certificate.crt/etc/nginx/sites-enabled/your-domain.com.conf中的certificate.crt和private.key to /etc/ssl - sudo mv certificate.crt /etc/ssl和sudo mv private.key /etc/ssl
紧跟在
listen [::]:80;行之后添加以下内容
listen 443 ssl;
ssl on;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;您的代码现在应该类似于以下内容:
server {
listen 80;
listen [::]:80;
listen 443 ssl;
ssl on;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
server_name your-domain.com.ng;
root /var/www/ghost/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}sudo /etc/init.d/nginx restarthttps://stackoverflow.com/questions/70162507
复制相似问题