既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上C C++开发知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
nginx(engine x) 是一个HTTP服务器/反向代理服务器、邮件代理服务器、 TCP/UDP 代理服务器,最初由 Igor Sysoev 开发的,在很长的一段时间里, nginx 运行在很多高负载的俄罗斯网站上,包括 Yandex, Mail.Ru, VK, and Rambler 。
nginx 具有占用内存少,并发能力强的特点,事实上 nginx 的并发能力确实在同类型的网页服务器中表现较好。
2. 安装
本文使用 yum 命令安装 nginx ,如下:
yum install -y nginx.x86_64
使用的 yum 源为 epel , epel 源相关配置点击此处。
3. 常用配置
3.1 默认配置
安装完 nigix 之后,首先使用默认配置启动 nginx ,测试 nginx 是否能够正常工作,如下:
[root@node1 ~]# nginx
[root@node1 ~]#
[root@node1 ~]# ps -ef|grep nginx
root 2711 1 0 20:27 ? 00:00:00 nginx: master process nginx
nginx 2712 2711 0 20:27 ? 00:00:00 nginx: worker process
root 2714 2621 0 20:27 pts/1 00:00:00 grep --color=auto nginx
[root@node1 ~]#
在web浏览器中打开 nginx 服务器地址,如下:
从上面web浏览器的显示结果能够看到, nginx 服务器已经正常启动了。
3.2 常用配置
通常我们都需要根据实际情况,修改 nginx 的配置。
nginx 的配置文件存放在 /etc/nginx 下,如下:
上述文件中的 nginx.conf 是 nginx 的主配置文件,通常我们只需要修改该配置文件即可,其余配置文件,一般只需要使用默认提供的即可。
安装 nginx 之后的 nginx.conf 默认配置如下(去掉一些注释):
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
![img](https://img-blog.csdnimg.cn/img_convert/1181a7408ec6b5097c368e3e02034682.png)
![img](https://img-blog.csdnimg.cn/img_convert/33faae57e975a058d1e8b2ea32e819b3.png)
**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
**[需要这份系统化的资料的朋友,可以添加戳这里获取](https://bbs.csdn.net/topics/618668825)**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**
s/618668825)**
**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**