Fix the ‘Too Many Open Files’ Error in a systemd service in Linux
In short:
Change the service file, and add two lines after [Service] line,
[Service]
LimitNOFILE=65535
LimitNOFILESoft=65535
If you want to know more, read the Reference
In short:
Change the service file, and add two lines after [Service] line,
[Service]
LimitNOFILE=65535
LimitNOFILESoft=65535
If you want to know more, read the Reference
Just record what I made Nginx working with a project located in someone's HOME directory on a Linux machine with SELinux on.
ValueError: Port tcp/8081 already defined
, replace -a
with -m
. semanage port -a -t http_port_t -p tcp 8081
telnet localhost 8081
works, but telnet 192.168.168.168 8081
from another machine not working!firewall-cmd permanent add-port=8081/tcp
firewall-cmd --reload
setsebool -P httpd_enable_homedirs 1
setenforce 0
systemctl restart nginx
systemctl daemon-reload
I had written the following code in a project
...
return s && s.value || null
It works well for some days until a colleague did some code refactoring. In the beginning, s.value is a string value, and an empty string is not a valid value, so the code works well. After the refactoring, s.value became an integer, and this time 0
is a valid value. So you can imagine when s.value === 0
the code above will return null instead of 0. It leads to a bug!
Therefore please use the"A || B
" expression with caution!
公众平台设置H5静态页服务器IP白名单
上传验证文件到根目录(一定要先做好这一步才能做下一步啊
公众平台设置域名白名单
服务器端配置公众平台 appId, appSecret
缓存针对此appId的 accessToken 和 jsapi_ticket
服务器端生成签名.....参数一定要按字典序!(坑)
半年多前配过一次,磕磕绊绊的,勉强配好了能用。这次老朋友又买了一台类似的机器,我以为会很快搞定,结果又陆续整了好几个小时。为避免下次折腾的时候浪费时间,简要记录一下折腾过程。
回头看看也没什么.....就这么点事儿,整了几个小时。如果第一次整完就写篇备忘记录....哈,亡羊补牢,犹未晚,我这不就写了么!