參考: Windows下用Nginx配置https服務器及反向代理springboot項目
注意:使用nginx,則springboot不需要配置,nginx配置完後跑項目,然後 https://本地IP/mysql/getUserData 這樣就能訪問了(其實也可以把IP換爲其他名稱也可以,這裏不做研究)
問題1:
從error.log日誌文件分析出:
實際上start nginx根本就沒有開啓,可能是端口占用了,nginx.conf裏面有一個443端口,可能是這個佔用了,把這個端口殺掉在開啓nginx。
問題2:下圖爲index.html。如果配置好了,發現沒有 nginx 歡迎頁面,則肯定是
nginx.conf 中:
location / {
root html;
index index.html index.htm;
}
root 和index註釋了,千萬別註釋,除非你結合了springboot項目了!!!!
問題3:訪問的時候如果頁面出不來可以清除一下緩存: