安裝NGINX網站系統元件
使用SSH 安裝 Nginx 預設值服務如下。
sudo apt install nginx -y如果想要全套件完整安裝Nginx,如下指令。
sudo apt install nginx nginx-full -y如需 nginx-額外元件,可運行以下指令來安裝這些模組。
sudo apt install nginx-extras -y安裝後檢查 Nginx 的服務是否安裝正確。
systemctl status nginxCHEAPSSL 網站申請憑證 (僅擷取重點)
https://cheapsslsecurity.com/
https://cheapsslsecurity.com/ssltools/csr-generator.php
可直接產生指令,複製到主機執行後,將產生CSR及KEY。
再將主機產生的CSR貼到CHEAPSSL網站申請後續動作!
連結https://cheapsslsecurity.com/client/reissueorder.html?orderdetailid=326598 
貼上主機產生的CSR資料並選擇APACHE+MOD SSL。
在主機設定相關憑證及NGINX設定值
在/etc/nginx/ssl 目錄下產生相關CSR及KEY。
再去網站申請登入並登入CSR資料等待產生相關憑證CRT。
當網站產生CRT憑證後將資料放入在/etc/nginx/ssl/並執行合併憑證動作。
cat your_domain.crt your_domain.ca-bundle >> ssl-bundle.crt 
主機憑證打開如有紅字表示憑證CRT跟KEY不合,請再檢查!
在以下目錄建置 
NGINX Reverse Proxy
設定檔/etc/nginx/conf.d/自己命名
內容如下:
server {
    listen 443;
    ssl on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
    server_name MyDomainName.AWEN.com;
    ssl_certificate /etc/nginx/ssl/MY-ssl-bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/MY.key;
      location / {
      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 $scheme;
      proxy_pass              http://轉址IP目的;
      proxy_read_timeout      90;
}
測試完成後可至以下網站測試SSL安全性
https://www.ssllabs.com/ssltest/
