使用certbot和nginx启用SSL
我正试图在我的Strapi产品上设置httpS,但这非常困难。我遵循了德里克梅哈菲的著作,但它对我不起作用( 我的pm2服务: My/etc/nginx/conf.d/upstream.conf文件:使用certbot和nginx启用SSL,ssl,nginx,strapi,certbot,Ssl,Nginx,Strapi,Certbot,我正试图在我的Strapi产品上设置httpS,但这非常困难。我遵循了德里克梅哈菲的著作,但它对我不起作用( 我的pm2服务: My/etc/nginx/conf.d/upstream.conf文件: # Strapi upstream server upstream strapi-gatsby { server localhost:1337; } server { # Listen HTTP listen 80; server_name strapi.live-fo
# Strapi upstream server
upstream strapi-gatsby {
server localhost:1337;
}
server {
# Listen HTTP
listen 80;
server_name strapi.live-for-good.org;
# Define LE Location
location ~ ^/.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/html;
}
# Else Redirect to HTTPS // API
# location / {
# return 301 https://$host$request_uri;
# }
}
My/etc/nginx/sites available/strapi.live-for-good.org.conf文件:
# Strapi upstream server
upstream strapi-gatsby {
server localhost:1337;
}
server {
# Listen HTTP
listen 80;
server_name strapi.live-for-good.org;
# Define LE Location
location ~ ^/.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/html;
}
# Else Redirect to HTTPS // API
# location / {
# return 301 https://$host$request_uri;
# }
}
我清除了可用站点中的默认程序包和启用站点中的默认程序包,创建了链接,当我想用服务nginx configtest检查它时,它失败了
但是,当我启动sudo nginx-t&&sudo服务nginx reload时,我得到了以下信息:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
系统
请在访问网站时提供错误代码?是否有
strapi.live for good.org
domain的SSL配置文件?我以前试图使用cerbot教程安装cerbot,因此有一个配置,但不起作用。请在访问网站时提供错误代码?是否有任何SSL配置文件strapi.live for good.org
domain?我以前尝试过使用cerbot教程安装cerbot,所以有一个配置,但不起作用