openssl

时间:2022-04-20 04:20:51

openssl genrsa -des3 -out server.key 1024
openssl req -new server.key -out servr.csr

se
server-fname
server-city
server-comp
server-unit
test-vm
test@test-vm.com

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

nginx

upstream nodejs {
server 192.155.89.91:8000;
}

server {
listen 443;
ssl on;
ssl_certificate /usr/share/app/node/tool/ssl/server.crt;
ssl_certificate_key /usr/share/app/node/tool/ssl/server.key;
server_name m.carsharingweb.com;

add_header Strict-Transport-Security max-age=500;

location / {
proxy_pass http://nodejs;
proxy_redirect off;
proxy_set_header Host $host ;
proxy_set_header X-Real-IP $remote_addr ;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
proxy_set_header X-Forwarded-Proto https;
}
}