1. 安裝ssl'證書
使用Let's Encrypt 的免費證書:
下載源代碼:
git clone https://github.com/letsencrypt/letsencrypt
我時阿里雲的機器,下載的有點慢,100k以內,稍等幾分鍾就好了
執行安裝下載腳本:
cd letsencrypt
./letsencrypt-auto certonly --standalone --email admin@****.com -d test.com -d www.test.com
參數 d 為域名,多個域名直接在后面繼續加就行
看到這個界面,直接Agree回車。
3秒鍾后完成
有三個月的有效期,2017-02-14過期,需要重新執行命令重新生成新的證書
證書存放在/etc/letsencrypt/下
2. 配置nginx:
nginx需要在編譯的時候加入 --with-http_ssl_module 支持
./configure --prefix=${dir}/nginx --with-http_ssl_module
站點mall.conf配置:
配置完后reload nginx即可
3.tomcat server.xml配置有兩處需要修改的:
修改后重啟tomcat