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

时间:2016-11-11 16:09:21

标签: ssl nginx

我已经验证当前使用的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?也许在网络层面?

1 个答案:

答案 0 :(得分:0)

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