日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

nginx部署与小程序配置

發布時間:2023/12/2 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 nginx部署与小程序配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

nginx部署與小程序配置說明

1、安裝nginx

$ sudo apt-get update $ sudo apt-get install nginx

2、配置https:

查看:
https://help.aliyun.com/knowledge_detail/95491.html?spm=5176.2020520154.cas.64.7dd7Quq8Quq8ap

mkdir /opt/cert

把證書上傳到這個文件夾

在/etc/nginx/conf.d下增加一個文件default.conf
內容:

server {listen 443;server_name localhost;ssl on;root html;index index.html index.htm;ssl_certificate /opt/cert/2012832_sqw.iruiyi.net.pem;ssl_certificate_key /opt/cert/2012832_sqw.iruiyi.net.key;ssl_session_timeout 5m;ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;ssl_protocols TLSv1 TLSv1.1 TLSv1.2;ssl_prefer_server_ciphers on;location / {root html;index index.html index.htm;} }

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部署与小程序配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。