建立憑證檔
mkdir /etc/nginx/ssl openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/nginx/ssl/raida13-cloudcoin-global.key -out /etc/nginx/ssl/raida13-cloudcoin-global.crt
設定 Nginx
server { listen 80; # SSL Configuration listen 443 ssl; ssl_certificate /etc/nginx/ssl/raida13-cloudcoin-global.crt; ssl_certificate_key /etc/nginx/ssl/raida13-cloudcoin-global.key; server_name raida13.cloudcoin.global; root /var/www/public_web/raida13.cloudcoin.global; index index.php index.html index.htm; ... }
server {
...
# force https-redirects
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
...
}
Images 0 | ||
---|---|---|
No images to display in the gallery. |