我从客户端收到了SSL证书,可以将其安装在他的Ubuntu服务器上。 该服务器正在使用NGINX作为Web服务器,我已经按照所有必需的步骤进行操作,但是浏览器仍然显示证书无效。
这就是我所做的:
编辑了我的sites-available
文件:
server {
listen 443 ssl;
listen [::]:443 ssl;
include snippets/iltlvdigitalit.conf;
include snippets/ssl-params.conf;
server_name iltlvdigitalit;
root /var/www/html/digital-system/front-end/dist/digital;
server_tokens off;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
location /api/v1/ {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
iltlvdigitalit.conf
ssl_certificate /etc/ssl/certs/iltlvdigitalit.cert;
ssl_certificate_key /etc/ssl/iltlvdigitalit_new.key;
ssl-params.conf
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off; # Requires nginx >= 1.5.9
# ssl_stapling on; # Requires nginx >= 1.3.7
# ssl_stapling_verify on; # Requires nginx => 1.3.7
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
不知道出了什么问题。谢谢! :)