分类:技术
-
Nginx 使用 htpasswd 生成密码认证
安装 httpd-tools
yum install -y httpd-tools
htpasswd 命令需要先安装 httpd-tools
修改 nginx.conf
# xxx.cuiliang.com server { listen 80; server_name xxx.cuiliang.com; auth_basic "密码提示语"; auth_basic_user_file /usr/local/nginx/conf/htpasswd.users; location / { //... } }
使用 htpasswd 生成密码
htpasswd -b /usr/local/nginx/conf/htpasswd.users
输入密码,再次确认密码,提示成功,OK!
重启 nginx
/usr/local/nginx/sbin/nginx -s reload
重启生效
-
WordPress 如何控制每页显示的条数
进入 wordpress 后台 设置 > 阅读 > 修改博客页面最多显示几篇文章 Feeds 同步最新几篇文章 在这里修改就可以了!
-
Yii Framework 应用通过 UCenter 整合 discuz 视频教程
这一讲主要讲了 Yii 应用和 discuz 通过 UCenter 实现了双向同步,有些代码写的也不是很严密,我只是给大家起个抛砖引玉的作用,大家如果有什么好的建议,欢迎讨论。提供程序源码及高清视频下载地址:
-
PHP 比较两个数组的值是否相等
function compareArray() { $arr1 = array('a', 'b', 'c', 'd'); $arr2 = array('d', 'c', 'b', 'a'); sort($arr1); sort($arr2); return $arr1 == $arr2; }
-
Linux 中 grep 命令实现“或”条件
\| 符号法
# grep 'cui\|liang'
使用多个 -e 参数
# grep -e cui -e liang
使用扩展 -E
# grep -E "cui|liang"
-
CentOS 中 yum update 与 yum upgrade 的区别
在 CentOS 系统中,
yum upgrade
与yum update
都会将系统包更新到最新版本。通过
man yum
查询到的帮助信息如下:update
If run without any packages, update will update every currently installed package. If one or more packages or package globs are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. (See Specifying package names for more information) If the packages or globs specified match to packages which are not currently installed then update will not install them. update oper- ates on groups, files, provides and filelists just like the "install" command. If the main obsoletes configure option is true (default) or the --obsoletes flag is present yum will include package obsoletes in its calculations - this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9. Note that "update" works on installed packages first, and only if there are no matches does it look for available packages. The difference is most noticeable when you do "update foo-1-2" which will act exactly as "update foo" if foo-1-2 is installed. You can use the "update-to" if you’d prefer that nothing happen in the above case.
upgrade
Is the same as the update command with the --obsoletes flag set. See update for more details.
唯一不同是:
yum upgrade
会删除旧版本的package
,而yum update
则会保留。注意!如果你的某些软件依赖旧版本的package
,请使用yum update
。 -
HTTP状态码 : HTTP Status Code
常见的状态码:
HTTP: Status 200 – 服务器成功返回网页 HTTP: Status 404 – 请求的网页不存在 HTTP: Status 503 – 服务不可用
-
Git 初始化 user.name 和 user.email
git config --global user.name "cuiliang" git config --global user.email "admin@yiichina.com"
文章归档
2024 年 04 月
11
2019 年 11 月
1
2019 年 10 月
1
2019 年 07 月
2
2019 年 01 月
3
2018 年 12 月
5
2018 年 11 月
1
2018 年 10 月
1
2018 年 09 月
1
2018 年 08 月
3
文章日历
2024 年 05 月 | ||||||
---|---|---|---|---|---|---|
日 | 一 | 二 | 三 | 四 | 五 | 六 |
29 | 30 | 31 | 01 | 02 | 03 | 04 |
05 | 06 | 07 | 08 | 09 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
27 | 28 | 29 | 30 | 31 | 01 | 02 |
文章标签
- Linux
- Go
- Yii
- 新浪
- CentOS
- PHP
- Git
- WSL
- Composer
- Mac
- 入职
- Bootstrap
- China
- UCenter
- 厦门
- 出差
- 长沙
- 湖南卫视
- 微博
- Tengine
- YUI
- 泰国
- pecl
- 优化
- GitLab
- 迁移
- rootless
- 年会
- 生日
- Tengin
- RedHat
- Sphinx
- cygwin
- Windows
- Tmux
- Zsh
- 升级
- MySQL
- sql_mode
- Shadowsockets
- 面向对象
- HTTP
- 状态码
- grep
- unoconv
- PPT
- Nginx
- htpasswd
- golang