update
This commit is contained in:
parent
e5bed9ea40
commit
1774f828ba
122
20191106/hand.html
Normal file
122
20191106/hand.html
Normal file
@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
.box {
|
||||
width: 1250px;
|
||||
height: 460px;
|
||||
border: 1px #eee solid;
|
||||
margin: 50px auto;
|
||||
}
|
||||
.box ul li {
|
||||
float: left;
|
||||
width: 250px;
|
||||
height: 460px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box" id="box">
|
||||
<!-- <ul>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul> -->
|
||||
</div>
|
||||
<script type='text/javascript'>
|
||||
function my$(id) {
|
||||
return document.getElementById(id)
|
||||
}
|
||||
var boxW = my$('box').scrollWidth
|
||||
var targetW = 1000
|
||||
|
||||
//初始化DOM 根据数据生成li
|
||||
var imgs = ['https://img13.360buyimg.com/babel/s590x470_jfs/t1/70490/39/14464/79762/5dbbe411E99f36c58/f36b525a1665151d.jpg.webp',
|
||||
'https://img10.360buyimg.com/pop/s590x470_jfs/t1/90587/22/1566/47968/5dc0de42Edf9b7386/c90e8c11df7a6dec.jpg.webp',
|
||||
'https://img12.360buyimg.com/pop/s590x470_jfs/t1/97859/1/1227/110519/5dbbdd0cEf6137bd6/1073886511f333d5.jpg.webp',
|
||||
'https://img30.360buyimg.com/pop/s590x470_jfs/t1/84717/13/1222/70971/5dbb9eccEab2e574e/e9993d5d21bbc566.jpg.webp',
|
||||
'https://img11.360buyimg.com/pop/s590x470_jfs/t1/81946/8/14162/78156/5db97b05Eea300353/7c0dc5a35715b144.jpg.webp']
|
||||
var averageW = (boxW - targetW) / (imgs.length -1)
|
||||
//生成ul
|
||||
var ul = document.createElement('ul')
|
||||
//批量生成li
|
||||
for(var i in imgs) {
|
||||
var li = document.createElement('li')
|
||||
//添加背景图片
|
||||
li.style.background = 'url('+ imgs[i] +') no-repeat left top'
|
||||
li.setAttribute('index',i);
|
||||
li.onmouseover = function() {
|
||||
index = this.getAttribute('index')
|
||||
for(var i in imgs) {
|
||||
if (i !== index)
|
||||
changeAnimation(lis[i],{'width':averageW},1)
|
||||
}
|
||||
changeAnimation(this,{'width':targetW},1)
|
||||
}
|
||||
li.onmouseout = function() {
|
||||
index = this.getAttribute('index')
|
||||
for(var i in imgs) {
|
||||
if (i !== index)
|
||||
changeAnimation(lis[i],{'width':250},1)
|
||||
}
|
||||
changeAnimation(this,{'width':250},1.5)
|
||||
}
|
||||
ul.appendChild(li)
|
||||
}
|
||||
my$('box').appendChild(ul)
|
||||
var lis = my$('box').children[0].children
|
||||
function changeAnimation(ele,json,isFast) {
|
||||
clearInterval(ele.timer)
|
||||
ele.timer = setInterval(function() {
|
||||
var flag = true
|
||||
for( var attr in json) {
|
||||
if(attr == 'opacity') {
|
||||
var current = getStyle(ele,attr)*100
|
||||
var target = json[attr]*100
|
||||
var step = (target - current)/10
|
||||
step = step > 0 ? Math.ceil(step) : Math.floor(step)
|
||||
current += step
|
||||
if(target != current ) {
|
||||
flag = false
|
||||
}
|
||||
ele.style[attr] = current/100
|
||||
}else if(attr == 'zIndex') {
|
||||
ele.style[attr] = json['zIndex']
|
||||
}else {
|
||||
var current = parseInt(getStyle(ele,attr))
|
||||
var target = parseInt(json[attr])
|
||||
var step = (target - current) / 100 * isFast
|
||||
step = step > 0 ? Math.ceil(step) : Math.floor(step)
|
||||
current += step
|
||||
if( target != current) {
|
||||
flag = false
|
||||
}
|
||||
ele.style[attr] = current + 'px'
|
||||
}
|
||||
}
|
||||
if(flag) {
|
||||
clearInterval(ele.timer)
|
||||
ele.timer = null
|
||||
fn && fn()
|
||||
}
|
||||
}, 10)
|
||||
}
|
||||
function getStyle(ele, attr) {
|
||||
return window.getComputedStyle ? window.getComputedStyle(ele, null)[attr] : ele.currentStyle[attr] || 0
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
31
Miscellaneous/animation.md
Normal file
31
Miscellaneous/animation.md
Normal file
@ -0,0 +1,31 @@
|
||||
# animation
|
||||
|
||||
animation 属性是一个简写属性,用于设置六个动画属性:
|
||||
```css
|
||||
/* 绑定名称 */
|
||||
animation-name
|
||||
|
||||
/* 动画持续时间 ms */
|
||||
animation-duration
|
||||
|
||||
/* 动画的速度曲线 */
|
||||
animation-timing-function
|
||||
|
||||
linear 动画从头到尾的速度是相同的。 测试
|
||||
ease 默认。动画以低速开始,然后加快,在结束前变慢。 测试
|
||||
ease-in 动画以低速开始。 测试
|
||||
ease-out 动画以低速结束。 测试
|
||||
ease-in-out 动画以低速开始和结束。
|
||||
|
||||
/* 定义动画何时开始 ms */
|
||||
animation-delay
|
||||
|
||||
/* 定义动画的播放次数 n|infinite */
|
||||
animation-iteration-count
|
||||
|
||||
/* 应该轮流反向播放动画 normal|alternate */
|
||||
animation-direction
|
||||
```
|
||||
|
||||
display 做不了过度,想控制就在js里边写定时器
|
||||
|
58
Miscellaneous/common.js
Normal file
58
Miscellaneous/common.js
Normal file
@ -0,0 +1,58 @@
|
||||
//封装id
|
||||
function my$(id){
|
||||
return document.getElementById(id)
|
||||
}
|
||||
|
||||
//获取文本内容兼容代码
|
||||
function getInnerText(element){
|
||||
if(element.textContent){
|
||||
return element.textContent
|
||||
}else if(element.getInnerText){
|
||||
return element.innerText
|
||||
}
|
||||
}
|
||||
|
||||
//获取文本内容兼容代码
|
||||
function getInnerText(element,value){
|
||||
if(element.textContent){
|
||||
element.textContent = value
|
||||
}else if(element.getInnerText){
|
||||
element.innerText = value
|
||||
}
|
||||
}
|
||||
//为任意元素绑定事件的兼容
|
||||
function addEventListener(ele,type,fn){
|
||||
if(ele.addEventListener){
|
||||
ele.addEventListener(type,fn,false)
|
||||
}else if(ele.attachEvent){
|
||||
ele.attachEvent('on'+type,fn)
|
||||
}else{
|
||||
els['on'+type] = fn
|
||||
}
|
||||
}
|
||||
|
||||
//解绑事件的兼容性
|
||||
function removeEventListener(ele,type,fn){
|
||||
if(ele.removeEventListener){
|
||||
ele.removeEventListener(type,fn,false)
|
||||
}else if(ele.detachEvent){
|
||||
ele.detachEvent('on'+type,fn)
|
||||
}else{
|
||||
ele['on'+type] = null
|
||||
}
|
||||
}
|
||||
|
||||
// 事件参数兼容性
|
||||
var ev = window.event || e
|
||||
|
||||
//获取元素的任意一个样式的属性值
|
||||
function getStyle(ele,attr){
|
||||
return window.getComputedStyle ? window.getComputedStyle(ele,null)[attr] : ele.currentStyle[attr] || 0
|
||||
}
|
||||
//对于页面scrollLeft scrollTop 有需要处理兼容
|
||||
function getScroll(){
|
||||
return{
|
||||
left:window.PageXoffset || document.body.scrollLeft || document.documentElement.scrollLeft || 0,
|
||||
top:window.PageYoffset || document.body.scrollTop || document.documentElement.scrollTop || 0
|
||||
}
|
||||
}
|
@ -1,7 +1,88 @@
|
||||
#flask
|
||||
# flask
|
||||
|
||||
* venv
|
||||
* 关闭 `deactivate`
|
||||
安装venv
|
||||
|
||||
`python3 -m venv venv`
|
||||
|
||||
启动venv
|
||||
|
||||
`. venv/bin/activate`
|
||||
|
||||
关闭venv
|
||||
|
||||
`deactivate`
|
||||
|
||||
查看现在已经安装的依赖
|
||||
|
||||
`pip3 list`
|
||||
|
||||
更新pip
|
||||
|
||||
`pip install --upgrade pip`
|
||||
|
||||
安装Flask
|
||||
|
||||
` pip install Flask`
|
||||
|
||||
安装最新的flask
|
||||
|
||||
`pip install -U https://github.com/pallets/flask/archive/master.tar.gz`
|
||||
|
||||
安装pymongo
|
||||
|
||||
` pip install pymongo`
|
||||
|
||||
安装requests
|
||||
|
||||
` pip install requests`
|
||||
|
||||
安装payjs
|
||||
|
||||
` pip install payjs`
|
||||
|
||||
设置全局变量
|
||||
|
||||
`export FLASK_APP=qrcode.py`
|
||||
|
||||
`export FLASK_ENV=development`
|
||||
|
||||
启动
|
||||
|
||||
`flask run --host=0.0.0.0`
|
||||
|
||||
在虚拟环境下安装gunicorn
|
||||
|
||||
`pip install gunicorn`
|
||||
|
||||
添加配置文件 gunicorn.conf
|
||||
|
||||
```
|
||||
# 并行工作线程数
|
||||
workers = 4
|
||||
# 监听内网端口5000【按需要更改】
|
||||
bind = '127.0.0.1:5000'
|
||||
# 设置守护进程【关闭连接时,程序仍在运行】
|
||||
daemon = True
|
||||
# 设置超时时间120s,默认为30s。按自己的需求进行设置
|
||||
timeout = 120
|
||||
# 设置访问日志和错误信息日志路径
|
||||
# accesslog = './logs/acess.log'
|
||||
# errorlog = './logs/error.log'
|
||||
# 自动重启
|
||||
autostart = ture
|
||||
```
|
||||
|
||||
启动gunicorn
|
||||
|
||||
`gunicorn qrcode:app -c gunicorn.conf`
|
||||
|
||||
查询gunicorn
|
||||
|
||||
`pstree -ap|grep gunicorn`
|
||||
|
||||
停止进程
|
||||
|
||||
`kill (pid)`
|
||||
|
||||
* 在路由中
|
||||
* 同时有user/ 和 user 优先解释 user/
|
||||
|
@ -4,4 +4,60 @@
|
||||
`netstat -ntlp`
|
||||
|
||||
创建文件
|
||||
`touch`
|
||||
`touch`
|
||||
|
||||
查看 5000端口占用程序
|
||||
`sudo lsof -i:5000`
|
||||
|
||||
停止进程
|
||||
`sudo kill (PID)`
|
||||
|
||||
下载到当前文件夹
|
||||
`wget"<url>"`
|
||||
|
||||
下载到 /home/omio/Desktop
|
||||
`wget -P /home/omio/Desktop/"<url>"`
|
||||
|
||||
下载并重命名为NewFileName
|
||||
`wget -O /home/omio/Desktop/NewFileName"<url>"`
|
||||
|
||||
压缩
|
||||
`zip -r archive_name.zip directory_to_compress`
|
||||
|
||||
解压缩
|
||||
`unzip archive_name.zip`
|
||||
|
||||
打包
|
||||
`tar -cvf archive_name.tar directory_to_compress`
|
||||
|
||||
解包
|
||||
`tar -xvf archive_name.tar.gz`
|
||||
|
||||
压缩
|
||||
`tar -zcvf archive_name.tar.gz directory_to_compress`
|
||||
|
||||
解压缩
|
||||
`tar -zxvf archive_name.tar.gz`
|
||||
|
||||
`tar -zxvf archive_name.tar.gz -C /tmp/extract_here/`
|
||||
|
||||
重命名
|
||||
`mv fromfile tofile`
|
||||
如把文件a.txt得命名为b.txt,可以是mv a.txt b.txt。
|
||||
|
||||
删除一个空目录
|
||||
`rm -d 目录名`
|
||||
|
||||
删除一个空目录
|
||||
`rm -dir 目录名`
|
||||
|
||||
删除一个非空目录
|
||||
`rm -r 目录名`
|
||||
|
||||
删除文件
|
||||
`rm 文件名`
|
||||
|
||||
修改文件权限
|
||||
[链接]('https://blog.csdn.net/slwhy/article/details/78876237')
|
||||
|
||||
|
||||
|
@ -1,3 +1,35 @@
|
||||
# nginx
|
||||
|
||||
service nginx restart
|
||||
## 重启
|
||||
service nginx restart
|
||||
|
||||
## 配置https
|
||||
```
|
||||
server {
|
||||
#SSL 访问端口号为 443
|
||||
listen 443;
|
||||
#填写绑定证书的域名
|
||||
server_name qr.powerrain.cn;
|
||||
#启用 SSL 功能
|
||||
ssl on;
|
||||
#证书文件名称
|
||||
ssl_certificate 1_qr.powerrain.cn_bundle.crt;
|
||||
#私钥文件名称
|
||||
ssl_certificate_key 2_qr.powerrain.cn.key;
|
||||
ssl_session_timeout 5m;
|
||||
#请按照这个协议配置
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
#请按照这个套件配置,配置加密套件,写法遵循 openssl 标准。
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
|
||||
#root /var/www/www.domain.com;
|
||||
#index index.html index.htm;
|
||||
proxy_pass https://flask/; #这里面的最后的斜杠一定不能少
|
||||
}
|
||||
}
|
||||
upstream flask{
|
||||
server 0.0.0.0:5000;
|
||||
}
|
||||
```
|
290
Miscellaneous/pi.md
Normal file
290
Miscellaneous/pi.md
Normal file
@ -0,0 +1,290 @@
|
||||
# pi
|
||||
|
||||
## 更换软件源
|
||||
```
|
||||
sudo nano /etc/apt/sources.list
|
||||
deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi
|
||||
sudo nano /etc/apt/sources.list.d/raspi.list
|
||||
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
## 安装git
|
||||
|
||||
安装git
|
||||
`sudo apt-get install wget git-core`
|
||||
|
||||
创建新用户和用户组
|
||||
`adduser --system --shell /bin/bash --gecos 'git version control by pi' --group --home /home/git git`
|
||||
|
||||
改密码
|
||||
`passwd git`
|
||||
|
||||
切用户
|
||||
`su git`
|
||||
|
||||
进文件夹
|
||||
`cd /home/git`
|
||||
|
||||
初始化
|
||||
```
|
||||
mkdir test.git
|
||||
cd test.git
|
||||
git --bare init
|
||||
```
|
||||
|
||||
用户:添加远程
|
||||
`git remote add pi git@[your IP]:/home/git/test.git`
|
||||
|
||||
## 关机
|
||||
sudo shutdown -h now
|
||||
sudo halt
|
||||
sudo poweroff
|
||||
sudo init 0
|
||||
|
||||
## 重启
|
||||
sudo reboot
|
||||
shutdown -r now
|
||||
shutdown -r 18:23:52 #定时重启在18点23分52秒关闭
|
||||
|
||||
## ngrok
|
||||
下载
|
||||
`wget 'hls.ctopus.com/sunny/linux_arm.zip?v=2'`
|
||||
|
||||
重命名
|
||||
mv linux_arm.zip?v=2 linux_arm.zip
|
||||
|
||||
解压缩
|
||||
`unzip linux_arm.zip`
|
||||
|
||||
切文件夹
|
||||
`cd linux_arm`
|
||||
|
||||
启动!
|
||||
` ./sunny clientid 213330227041`
|
||||
|
||||
后台运行
|
||||
`setsid ./sunny clientid 213330227041 &`
|
||||
|
||||
移动到 /use/local/bin 目录下并给予可执行权限
|
||||
```
|
||||
sudo mv sunny /usr/local/bin/sunny
|
||||
sudo chmod +x /usr/local/bin/sunny
|
||||
```
|
||||
|
||||
编写启动脚本
|
||||
`sudo vim /etc/init.d/sunny`
|
||||
|
||||
内容
|
||||
```
|
||||
#!/bin/sh -e
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ngrok.cc
|
||||
# Required-Start: $network $remote_fs $local_fs
|
||||
# Required-Stop: $network $remote_fs $local_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: autostartup of ngrok for Linux
|
||||
### END INIT INFO
|
||||
|
||||
NAME=sunny
|
||||
DAEMON=/usr/local/bin/$NAME
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f $PIDFILE ]; then
|
||||
echo "$NAME already running..."
|
||||
echo -e "\033[1;35mStart Fail\033[0m"
|
||||
else
|
||||
echo "Starting $NAME..."
|
||||
start-stop-daemon -S -p $PIDFILE -m -b -o -q -x $DAEMON -- clientid 213330227041 || return 2
|
||||
echo -e "\033[1;32mStart Success\033[0m"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
echo "Stoping $NAME..."
|
||||
start-stop-daemon -K -p $PIDFILE -s TERM -o -q || return 2
|
||||
rm -rf $PIDFILE
|
||||
echo -e "\033[1;32mStop Success\033[0m"
|
||||
;;
|
||||
restart)
|
||||
$0 stop && sleep 2 && $0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
```
|
||||
|
||||
测试
|
||||
```
|
||||
sudo chmod 755 /etc/init.d/sunny
|
||||
sudo /etc/init.d/sunny start
|
||||
sudo /etc/init.d/sunny start #启动
|
||||
sudo /etc/init.d/sunny stop #停止
|
||||
sudo /etc/init.d/sunny restart #重启
|
||||
```
|
||||
|
||||
开机启动
|
||||
```
|
||||
cd /etc/init.d
|
||||
sudo update-rc.d sunny defaults 90 #加入开机启动
|
||||
sudo update-rc.d -f sunny remove #取消开机启动
|
||||
```
|
||||
|
||||
### 安装gogs
|
||||
|
||||
创建新用户git 如果不创建会导致主账号登陆不了ssh
|
||||
```js
|
||||
//切换为root用户为了获取创建用户的权限
|
||||
sudo su
|
||||
|
||||
//给root创建一个新的密码
|
||||
sudo passwd root
|
||||
|
||||
//添加一个新用户(如用户名为csdn)
|
||||
useradd csdn
|
||||
|
||||
//为该用户设定登录密码
|
||||
passwd csdn
|
||||
|
||||
//为该用户指定命令解释程序(通常为/bin/bash)
|
||||
usermod -s /bin/bash csdn
|
||||
|
||||
//为该用户指定用户主目录
|
||||
usermod -d /home/csdn csdn
|
||||
|
||||
//查看用户的属性
|
||||
cat /etc/passwd
|
||||
|
||||
// 切换到用户csdn
|
||||
su csdn
|
||||
|
||||
// 再次切换到root用户(不要用sudo su, 而用su root)
|
||||
su root
|
||||
|
||||
// 执行visudo命令
|
||||
visudo
|
||||
|
||||
// 该命令实际上打开的是/etc/sudoers文件,修改该文件,在“root ALL=(ALL:ALL) ALL”这一行下面加入一行:
|
||||
csdn ALL=(ALL:ALL) ALL
|
||||
|
||||
//ctrl+o(然后再按enter)保存,ctrl+c取消,ctrl+x退出
|
||||
```
|
||||
|
||||
下载
|
||||
`wget 'https://github.com/gogs/gogs/releases/download/v0.11.91/raspi_armv7.zip'`
|
||||
|
||||
解压
|
||||
`unzip raspi_armv7.zip`
|
||||
|
||||
进文件夹
|
||||
`cd gogs`
|
||||
|
||||
开启web服务
|
||||
`./gogs web`
|
||||
|
||||
去3000端口进行设置,数据库设置成sqlite就行
|
||||
|
||||
在`/etc/systemd/system/gogs.service`新建文件
|
||||
```
|
||||
[Unit]
|
||||
Description=Gogs (Go Git Service)
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
#After=mysqld.service
|
||||
#After=postgresql.service
|
||||
#After=memcached.service
|
||||
#After=redis.service
|
||||
|
||||
[Service]
|
||||
# Modify these two values and uncomment them if you have
|
||||
# repos with lots of files and get an HTTP error 500 because
|
||||
# of that
|
||||
###
|
||||
#LimitMEMLOCK=infinity
|
||||
#LimitNOFILE=65535
|
||||
Type=simple
|
||||
User=git
|
||||
Group=git
|
||||
WorkingDirectory=/home/git/gogs
|
||||
ExecStart=/home/git/gogs/gogs web
|
||||
Restart=always
|
||||
Environment=USER=git HOME=/home/git
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
更新 User、Group、WorkingDirectory、ExecStart 和 Environment 为相对应的值。其中 WorkingDirectory 为您的 Gogs 实际安装路径根目录。
|
||||
|
||||
[可选] 如果您 Gogs 安装示例使用 MySQL/MariaDB、PostgreSQL、Redis 或 memcached,请去掉相应 After 属性的注释。
|
||||
|
||||
然后通过 `sudo systemctl enable gogs` 命令激活,最后执行 `sudo systemd start gogs`,就可以做到开机启动了。
|
||||
|
||||
官方文件解释[docs]('https://gogs.io/docs/advanced/configuration_cheat_sheet')
|
||||
|
||||
重启 `sudo systemctl restart gogs`
|
||||
|
||||
### 安装nginx
|
||||
|
||||
安装
|
||||
`sudo apt-get install nginx`
|
||||
|
||||
启动
|
||||
`sudo /etc/init.d/nginx start`
|
||||
|
||||
修改配置
|
||||
`sudo nano /etc/nginx/sites-available/default`
|
||||
|
||||
重启
|
||||
`sudo /etc/init.d/nginx reload`
|
||||
|
||||
修改文件夹权限
|
||||
`sudo chmod o+rw /etc/nginx`
|
||||
|
||||
```
|
||||
server {
|
||||
#SSL 访问端口号为 443
|
||||
listen 443 ssl http2; #填写绑定证书的域名
|
||||
server_name pi.powerrain.cn;
|
||||
#证书文件名称
|
||||
ssl_certificate 1_pi.powerrain.cn_bundle.crt;
|
||||
#私钥文件名称
|
||||
ssl_certificate_key 2_pi.powerrain.cn.key;
|
||||
ssl_session_timeout 5m;
|
||||
#请按照这个协议配置
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
#请按照这个套件配置,配置加密套件,写法遵循 openssl 标准。
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
}
|
||||
location /html {
|
||||
root /var/www/html;
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name pi.powerrain.cn;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
}
|
||||
location /html {
|
||||
root /var/www/html;
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user