我正在尝试在我的网站上设置 HTTPS/SSL test.example.com
。
我编辑了我的文件,/etc/nginx/sites-enabled/my_site
以便server {}
块的顶部是这个。
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/cert_chain.crt;
ssl_certificate_key /etc/ssl/example.key;
server_name test.example.com;
error_log /var/log/nginx/debug.log debug;
... Rest of code ...
}
Run Code Online (Sandbox Code Playgroud)
我跑了nginx restart
。但是如果我https://test.testexample.com
在 Chromium 中访问,我的浏览器会警告我与该站点的连接不安全。
铬错误:
Your connection is not private
Attackers might be trying to steal your information from test.example.com (for example, passwords, messages, or credit cards). Learn more
NET::ERR_CERT_COMMON_NAME_INVALID
This server could not prove that it is test.example.com; its security certificate is from example.com. …
Run Code Online (Sandbox Code Playgroud) 我正在阅读有关在 nginx 中启用调试日志的指南:https : //nginx.org/en/docs/debugging_log.html
我有一个 Ubuntu 14.04 服务器。我必须在哪些目录中运行这些命令
./configure --with-debug
error_log /path/to/log debug;
configure arguments: --with-debug
Run Code Online (Sandbox Code Playgroud)