gpt4 book ai didi

ssl - SSL 模式下的 Nginx 配置文件中没有信息

转载 作者:太空宇宙 更新时间:2023-11-03 14:44:09 26 4
gpt4 key购买 nike

我已验证当前使用的 nginx.conf 包含:

user  nginx;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;

虽然 default.cong(目录/etc/nginx/conf.d 中唯一的文件)包含:

server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

我看不到任何与 ssl 相关的信息。

但是,当我进入我的域时,写

www.example.com 

不显示任何页面。

去的时候

https://www.example.com 

显示页面。

这怎么可能?有没有其他地方可以指向一个域来强制使用 SSL?也许在网络层面?

最佳答案

您是否检查过/etc/nginx/sites-available/* 文件夹中的文件?您可能在他们的配置中有一个默认文件供您修改。

关于ssl - SSL 模式下的 Nginx 配置文件中没有信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40551897/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com