1、json格式:
{“test”:"eee",“test”:"eee"}最后一行不能有逗号,必须双引号。
2、git提交报错:
TaskCanceledException encountered.
修改git config:git config --global credential.helper manager
若git报错,.git/config的url改为url = https://自己的用户名:自己的密码@原路径
3、nginx隐藏index.php
server {
listen port;
server_name localhost;
root project_path;
#root /var/www/home;
index index.html index.htm index.php;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
4、ftp搭建总结
ftp分为命令端口21和数据端口20,设置错误和防火墙端口未开会导致登录异常。
参考:
详解:https://blog.csdn.net/weixin_34199405/article/details/89836838
参数详解:https://www.cnblogs.com/idlo/p/10825094.html
开ftp端口:https://blog.csdn.net/makanglei1994/article/details/74020572
5、添加环境变量
$:vim /etc/profile
修改
PATH=$PATH:/user_path1:/user_path2
export PATH
$:
source /etc/profile
参考:https://blog.csdn.net/xinyflove/article/details/82744927
6、开机自启动
chkconfig --add cmd
或者
systemctl enable redis
参考:https://blog.csdn.net/zyddj123/article/details/82497640
https://www.cnblogs.com/tengjian/p/8793500.html
7、ftp 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
vsftpd.cof 加一行
allow_writeable_chroot=YES
参考:https://blog.csdn.net/weixin_34405557/article/details/92875891
8、ftp不可创建文件或上传
查SELINUX
vi /etc/selinux/config
systemctl disable firewalld.service
或者
看文件权限 进行 chgrp chmod 等操作
参考:
https://www.cnblogs.com/bpzblog/p/12612513.html