我有我的EV SSL证书.我正在关于如何在Ubuntu上使用我的证书与Nginx的教程
当我试图重新启动我的Nginx,我得到:
**invalid number of arguments in "ssl_certificate_key" directive in /etc/Nginx/sites-enabled/default
我到目前为止做了什么
sudo nano /etc/Nginx/sites-enabled/default
upstream app {
# Path to Unicorn SOCK file,as defined prevIoUsly
server unix:/home/zhall/zoulfia/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name moneytree.space www.moneytree.space " " 178.62.19.65;
rewrite ^/(.*) https://moneytree.space/$1 permanent;
}
# HTTPS server
server {
listen 443;
server_name moneytree.space www.moneytree.space " " 178.62.19.65;
root /home/zhall/zoulfia/public;
ssl on;
ssl_certificate /home/zhall/moneytree.space.chained.crt;
**ssl_certificate_key /home/zhall/ moneytree.space.key**
ssl_session_timeout 10m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ =404;
}
}
当我重新启动Nginx与—
sudo service Nginx restart
在我的日志文件—-
sudo nano /var/log/Nginx/error.log,I get:
**invalid number of arguments in "ssl_certificate_key" directive in /etc/Nginx/sites-enabled/default
一切都是新的,所以我需要你的帮助来解决这个问题.我做错了什么,最重要的是如何纠正这个错误?
谢谢,
Zoulfia
最佳答案
看起来你可能在ssl_certificate_key行末尾缺少一个分号.