2019年5月3日
摘要: 创建目录索引 cd /etc/nginx/conf.d vim mulusouyin.conf server { listen 80; charset utf-8,gbk; location / { root /module; autoindex on; auto... 阅读全文
posted @ 2019-05-03 12:08 叶秀儿 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1.配置多端口的虚拟主机 [root@web01 conf.d]# vim port.conf server { listen 81; location / { root /code_81; index index.html; } } server { listen 8... 阅读全文
posted @ 2019-05-03 11:01 叶秀儿 阅读(147) 评论(0) 推荐(0) 编辑
摘要: [root@web01 conf.d]# cat ip.conf server { listen 10.0.0.7:80; server_name _; location / { root /code_ip_eth0; index index.html; } } server { listen 172.16.1.7:... 阅读全文
posted @ 2019-05-03 10:59 叶秀儿 阅读(1094) 评论(0) 推荐(0) 编辑
摘要: 为什么选择nginx nginx非常轻量 互联网公司都选择nginx nginx技术成熟,具备的功能时企业最常用使用而且最需要的 适合当前主流架构趋势,微服务、云架构、中间层 统一技术栈,降低维护成本,降低技术更新成本 nginx采用Epool网络模型,Apache采用Select模型 Select:当用户发起一次请求,select模型就会进行一次遍历扫描,... 阅读全文
posted @ 2019-05-03 10:58 叶秀儿 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 常见状态码 200ok 301永久跳转 302临时跳转 307内部跳转 304走本地缓存 400客户端错误 401认证错误 403找不到主页,权限不足 404找不到主页 500内部错误 502找不到后端主机 503... 阅读全文
posted @ 2019-05-03 09:47 叶秀儿 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 更改远程连接登陆的端口 禁止root管理员直接登陆 密码认证方式改为密钥认证 重要服务不使用公网IP地址 使用防火墙来限制来源IP地址 Port 666变更SSH服务远程连接端口 PermitRootLoginno禁止root用户直接远程登陆 PasswordAuthenticationno禁止使用密码直接远程登陆 UseDN... 阅读全文
posted @ 2019-05-03 09:00 叶秀儿 阅读(184) 评论(0) 推荐(0) 编辑