亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

openssl - How to configure nginx to configure SSL security certificate and restart without entering password
阿神
阿神 2017-05-16 17:30:14
0
2
1169

Today I configured an SSL security certificate for Nginx

ssl on; 
    ssl_certificate  /home/cert/server.crt;
    ssl_certificate_key  /home/cert/server.key;

Then the password will be required when restarting and reloading. . .

# /usr/local/nginx/sbin/nginx -s reload
Enter PEM pass phrase:

But I have a script that needs to run reload every day, and the password input function cannot be implemented
Is there any way to automatically enter the password?

P.S. I tried the pipe, but nginx couldn’t receive it

阿神
阿神

閉關(guān)修行中......

reply all(2)
給我你的懷抱

You can do this with a private key. Generate a decrypted key file to replace the original key file.

openssl rsa -in server.key -out server.key.unsecure

Then modify the configuration file

ssl on; 
    ssl_certificate  /home/cert/server.crt;
    ssl_certificate_key  /home/cert/server.key.unsecure;

This way you don’t have to enter your password

習慣沉默

Try the expect command, which can be used to enter the password. You can refer to the expect automatic ssh script.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template