我刚刚在运行Nginx的测试服务器上上传了一个SSL证书。我已经将证书和密钥文件路径添加到nginx.conf中,但是无论我尝试了什么,我都会得到以下错误:
Feb 23 15:01:20 myserver systemd[1]: Starting The nginx HTTP and reverse proxy server...
Feb 23 15:01:21 myserver nginx[1315]: nginx: [emerg] invalid value "ssl_certificate" in /etc/nginx/nginx.conf:67
Feb 23 15:0
我将nginx更新为1.23.4,nginx -t开始显示警告:
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/sites-enabled/beta:5
nginx: [warn] protocol options redefined for [::]:443 in /etc/nginx/sites-enabled/default:28
nginx: [warn] protocol options redefined for [::]:443 in /etc/nginx/sites-enabled/
我为我的站点建立了一个安全的连接,但是nginx不会将https重定向到我的实例。当我转到url https:mydomain.com时,nginx显示了欢迎来到nginx页面。
我的nginx配置
server {
listen 80;
# The host name to respond to
server_name mydomain.com www.mydomain.com;
location / {
# Backend server
proxy_pass http://000.000.00.000:8
证书还未上传至/usr/local/nginx/conf/ssl文件夹,之前有先上传但还是一样的(提示:...key value dismatch)
提示以下信息:
nginx: [emerg] BIO_new_file("/usr/local/nginx/conf/ssl/www.twelife.wang.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/ssl/www.twelife.wang.cr
我以前吃过nginx,但现在它在网上是404了。也许是重新开始的,但我不确定。
404 Not Found
nginx/1.18.0 (Ubuntu)
我找过各种错误。-t没事。
/var/log/nginx/error.log
[notice] 60852#60852: signal process started
卷曲-I https://test.com
HTTP1.1 404 Not Found
Server: nginx/1.18.0 (Ununtu)
Date: Thu, 27 Aug 21:02:56 GMT
Content-Type: text/html
Content-Len