nginx部署与小程序配置
生活随笔
收集整理的這篇文章主要介紹了
nginx部署与小程序配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
nginx部署與小程序配置說明
1、安裝nginx
$ sudo apt-get update $ sudo apt-get install nginx2、配置https:
查看:
https://help.aliyun.com/knowledge_detail/95491.html?spm=5176.2020520154.cas.64.7dd7Quq8Quq8ap
把證書上傳到這個文件夾
在/etc/nginx/conf.d下增加一個文件default.conf
內容:
3、將圖片上傳到 這個目錄,比如:dir1/abc.jpg
/usr/share/nginx/html(本地也注意將圖片上傳git,避免丟失)
4、在瀏覽器中訪問:
https://sqw.iruiyi.net/dir1/abc.jpg能正常訪問則正常。
5、小程序,設置 開發 - request路徑
設置https://sqw.iruiyi.net
搭建msql服務,
https://www.cnblogs.com/heimaoloveyu/archive/2018/12/13/10113740.html配置mysql文件
https://www.cnblogs.com/YunnuoFan/p/8482449.html
service mysql restart service mysql status 創建數據庫 create database sqw; use sqw; set names utf8; 導入數據: source /home/test.sql;https://blog.csdn.net/hewenjing8168/article/details/80821447
show tables;允許所有用戶訪問
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY ' ' WITH GRANT OPTION; FLUSH PRIVILEGES;添加安全組規則
總結
以上是生活随笔為你收集整理的nginx部署与小程序配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: django-uwsgi配置
- 下一篇: Liunx 命令大全