1、Nginx的简介
nginx是一款轻量级的Web服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器;因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名,nginx还有非常丰富的第三方模块。2011年6月1日,nginx 1.0.4发布。nginx的特点是占有内存少,并发能力强,事实上nginx的并发能力确实在同类型的网页服务器中表现较好,中国大陆使用nginx网站用户有:百度、京东、新浪、网易、腾讯、淘宝等。

2、Nginx的特性和优点
特性:
nginx是一个很厉害的高性能Web和反向代理服务器,在高连接并发的情况下,nginx是Apache服务器不错的替代品,能够支持高达50000个并发连接数的响应;使用epoll and kqueue作为开发模型;nginx作为负载均衡服务器:nginx既可在内部直接支持和PHP程序对外进行服务,也可支持作为HTTP代理服务器对外进行服务;nginx采用C进行编写,不论系统资源开销还是CPU使用效率都比Perlbal要好很多。

优点:
1)高并发连接:官方测试能够支撑5万并发连接,在实际生产环境中跑到2-3万并发连接数
2)内存消耗少:在3万并发连接下,开启的10个nginx进程才消耗150M内存(15M*10=150M)
3)配置文件非常简单:风格跟程序一样通俗易懂
4)成本低廉:nginx为开源软件,可以免费使用。而购买F5 BIG-IP、NetScaler等硬件负载均衡交换 机则需要十多万至几十万人民币
5)支持Rewrite重写规则:能够根据域名、URL的不同,将HTTP请求分到不同的后端服务器群组
6)内置的健康检查功能:如果Nginx Proxy后端的某台Web服务器宕机了,不会影响前端访问
7)节省带宽:支持GZIP压缩,可以添加浏览器本地缓存的Header头
8)稳定性高:用于反向代理,宕机的概率微乎其微
9)模块化设计:模块可以动态编译
10)外围支持好:文档全,二次开发和模块较多
11)支持热部署:可以不停机重载配置文件
12)支持事件驱动、AIO(AsyncIO,异步IO)、mmap(Memory Map,内存映射)等性能优化

3、Nginx的功能和应用类型
基本功能:
1)静态资源的web服务器,能缓存打开的文件描述符
http、smtp、pop3协议的反向代理服务器
2)缓存加速、负载均衡
3)支持FastCGI(fpm,LNMP),uWSGI(Python)等
4)模块化(非DSO机制),过滤器zip、SSI及图像的大小调整
5)支持SSL

扩展功能:
1)基于名称和IP的虚拟主机
2)支持keepalive
3)支持平滑升级
4)定制访问日志、支持使用日志缓冲区提高日志存储性能
5)支持URL重写
6)支持路径别名
7)支持基于IP及用户的访问控制
8)支持速率限制,支持并发数限制

应用类别:
1)使用nginx结合FastCGI运行PHP、JSP、Perl等程序
2)使用nginx作反向代理、负载均衡、规则过滤
3)使用nginx运行静态HTML网页、图片
4)nginx与其他新技术的结合应用

4、Nginx的编译安装
1)基础配置:
配置yum源和关闭防火墙、selinux等

[root@www ~]# mount /dev/sr0 /mnt/cdrom/
mount: /dev/sr0 is write-protected, mounting read-only
[root@www ~]# yum repolist all
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
repo id                                               repo name                                         status
!jyy                                                  jyy                                               enabled: 3,723
repolist: 3,723
[root@www ~]# systemctl disable firewalld
[root@www ~]# iptables -X
[root@www ~]# iptables -F
[root@www ~]# iptables -Z
[root@www ~]# setenforce 0
setenforce: SELinux is disabled
[root@www ~]# 

2)下载源码包并解压缩

[root@www ~]# mkdir /application
[root@www ~]# cd /application/
[root@www application]# ls
nginx-1.8.1.tar.gz
[root@www application]# tar -xf nginx-1.8.1.tar.gz
[root@www application]# cd nginx-1.8.1
[root@www nginx-1.8.1]# ls
auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  man  README  src
[root@www nginx-1.8.1]# 

3)编译安装源码包

[root@www ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
--2019-03-18 13:30:15--  http://mirrors.aliyun.com/repo/Centos-7.repo
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 59.47.129.231, 59.47.129.229, 59.47.129.232, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|59.47.129.231|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2523 (2.5K) [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/CentOS-Base.repo’100%[============================================================================>] 2,523       --.-K/s   in 0s      2019-03-18 13:30:15 (111 MB/s) - ‘/etc/yum.repos.d/CentOS-Base.repo’ saved [2523/2523]
[root@www yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base                                                                                           | 3.6 kB  00:00:00
(1/2): base/x86_64/group_gz                                                                    | 166 kB  00:00:00
(2/2): base/x86_64/primary_db                                                                  | 6.0 MB  00:00:02
repo id                                repo name                                                       status
base/x86_64                            CentOS-7 - Base - mirrors.aliyun.com                            enabled: 10,019
jyy                                    jyy                                                             enabled:  3,723
repolist: 13,742
[root@www yum.repos.d]# yum install gcc gcc-c++  - y           //安装编译器工具
、、、、、、、、、、、、、、、、、、、、、             //过程省略
[root@www yum.repos.d]# cd /application/
[root@www application]# groupadd nginx
[root@www application]# useradd -r -g nginx nginx
[root@www application]#
[root@www application]# ls
nginx-1.8.1  nginx-1.8.1.tar.gz
[root@www application]# cd nginx-1.8.1
[root@www nginx-1.8.1]# ls
auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  man  README  src
[root@www nginx-1.8.1]# ./configure --prefix=/usr/local/nginx   --user=nginx --group=nginx
checking for OS+ Linux 3.10.0-957.el7.x86_64 x86_64
checking for C compiler ... found+ using GNU C compiler+ gcc version: 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for O_PATH ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found./configure: error: the HTTP rewrite module requires the PCRE library.      //缺少pcre软件包
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.[root@www nginx-1.8.1]#
[root@www nginx-1.8.1]# yum list all | grep -i pcre
pcre.i686                                   8.32-17.el7                    @base
pcre.x86_64                                 8.32-17.el7                    @base
pcre-devel.i686                             8.32-17.el7                    base
pcre-devel.x86_64                           8.32-17.el7                    base
pcre-static.i686                            8.32-17.el7                    base
pcre-static.x86_64                          8.32-17.el7                    base
pcre-tools.x86_64                           8.32-17.el7                    base
pcre2.i686                                  10.23-2.el7                    base
pcre2.x86_64                                10.23-2.el7                    base
pcre2-devel.i686                            10.23-2.el7                    base
pcre2-devel.x86_64                          10.23-2.el7                    base
pcre2-static.i686                           10.23-2.el7                    base
pcre2-static.x86_64                         10.23-2.el7                    base
pcre2-tools.x86_64                          10.23-2.el7                    base
pcre2-utf16.i686                            10.23-2.el7                    base
pcre2-utf16.x86_64                          10.23-2.el7                    base
pcre2-utf32.i686                            10.23-2.el7                    base
pcre2-utf32.x86_64                          10.23-2.el7                    base
[root@www nginx-1.8.1]# yum install pcre-devel.x86_64  -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved======================================================================================================================Package                       Arch                      Version                        Repository               Size
======================================================================================================================
Installing:pcre-devel                    x86_64                    8.32-17.el7                    base                    480 kTransaction Summary
======================================================================================================================
Install  1 PackageTotal download size: 480 k
Installed size: 1.4 M
Downloading packages:
pcre-devel-8.32-17.el7.x86_64.rpm                                                              | 480 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : pcre-devel-8.32-17.el7.x86_64                                                                      1/1 Verifying  : pcre-devel-8.32-17.el7.x86_64                                                                      1/1 Installed:pcre-devel.x86_64 0:8.32-17.el7                                                                                     Complete!//重新检查编译环境
[root@www nginx-1.8.1]# ./configure --prefix=/usr/local/nginx   --user=nginx --group=nginx
、、、、、、、、、、、、、、、、、、、、、   //过程省略./configure: error: the HTTP gzip module requires the zlib library.              //提示缺少一个zlib的软件包,安装即可
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
[root@www nginx-1.8.1]# yum install zilb-devel  -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
No package zilb-devel available.
Error: Nothing to do
[root@www nginx-1.8.1]#
[root@www nginx-1.8.1]# yum install zlib-devel  -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved======================================================================================================================Package                      Arch                     Version                           Repository              Size
======================================================================================================================
Installing:zlib-devel                   x86_64                   1.2.7-18.el7                      base                    50 kTransaction Summary
======================================================================================================================
Install  1 PackageTotal download size: 50 k
Installed size: 132 k
Downloading packages:
zlib-devel-1.2.7-18.el7.x86_64.rpm                                                             |  50 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : zlib-devel-1.2.7-18.el7.x86_64                                                                     1/1 Verifying  : zlib-devel-1.2.7-18.el7.x86_64                                                                     1/1 Installed:zlib-devel.x86_64 0:1.2.7-18.el7                                                                                    Complete![root@www nginx-1.8.1]# ./configure --prefix=/usr/local/nginx   --user=nginx --group=nginx
、、、、、、、、、、、、、、、、、、、、Configuration summary+ using system PCRE library+ OpenSSL library is not used+ using builtin md5 code+ sha1 library is not found+ using system zlib librarynginx path prefix: "/usr/local/nginx"nginx binary file: "/usr/local/nginx/sbin/nginx"nginx configuration prefix: "/usr/local/nginx/conf"nginx configuration file: "/usr/local/nginx/conf/nginx.conf"nginx pid file: "/usr/local/nginx/logs/nginx.pid"nginx error log file: "/usr/local/nginx/logs/error.log"nginx http access log file: "/usr/local/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"[root@www nginx-1.8.1]# make && make install      //没有报错,开始编译
、、、、、、、、、、、、、、、、、、、、、、、、、
[root@www nginx-1.8.1]# cd /usr/local/nginx/
[root@www nginx]# ls
conf  html  logs  sbin
[root@www nginx]# cd sbin/                 //启动服务
[root@www sbin]# ls
nginx
[root@www sbin]# ./nginx
[root@www sbin]# ss -tunlp | grep nginx
tcp    LISTEN     0      128       *:80                    *:*                   users:(("nginx",pid=11465,fd=6),("nginx",pid=11464,fd=6))
[root@www sbin]#

4)在浏览器中查看欢迎页面

5、基于端口的虚拟主机配置
1)创建三个首页的家目录和index页面

[root@www conf]# mkdir /test/{web1,web2,web3}   -pv
mkdir: created directory ‘/test’
mkdir: created directory ‘/test/web1’
mkdir: created directory ‘/test/web2’
mkdir: created directory ‘/test/web3’
[root@www conf]#
[root@www conf]# echo "Test page web1"  > /test/web1/index.html
[root@www conf]# echo "Test page web2"  > /test/web2/index.html
[root@www conf]# echo "Test page web3"  > /test/web3/index.html
[root@www conf]# ls /test/ -l
total 0
drwxr-xr-x 2 root root 23 Mar 18 13:53 web1
drwxr-xr-x 2 root root 23 Mar 18 13:54 web2
drwxr-xr-x 2 root root 23 Mar 18 13:54 web3

2)修改主配置文件,定义虚拟主机

[root@www conf]# vim nginx.conf
添加以下内容:
server {listen       81;server_name  localhost;location / {root   /test/web1;index  index.html index.htm;}}server {listen       82;server_name  localhost;location / {root   /test/web2;index  index.html index.htm;}}server {listen       83;server_name  localhost;location / {root   /test/web3;index  index.html index.htm;}}

3)重载服务并查看端口是否监听

[root@www conf]# /usr/local/nginx/sbin/nginx -s reload
[root@www conf]#
[root@www conf]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      11615/nginx: master
tcp        0      0 0.0.0.0:81              0.0.0.0:*               LISTEN      11615/nginx: master
tcp        0      0 0.0.0.0:82              0.0.0.0:*               LISTEN      11615/nginx: master
tcp        0      0 0.0.0.0:83              0.0.0.0:*               LISTEN      11615/nginx: master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      6762/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      6861/master
tcp6       0      0 :::22                   :::*                    LISTEN      6762/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      6861/master
udp        0      0 0.0.0.0:68              0.0.0.0:*                           6470/dhclient
[root@www conf]# 

4)在浏览器中查看虚拟主机主页面


6、基于IP地址的虚拟主机的配置
1)首先添加三个ip地址

[root@www conf]# ip addr add 192.168.126.141/24  dev  eno16777736
[root@www conf]# ip addr add 192.168.126.142/24  dev  eno16777736
[root@www conf]# ip addr add 192.168.126.143/24  dev  eno16777736
[root@www conf]#
[root@www conf]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 00:0c:29:60:18:fd brd ff:ff:ff:ff:ff:ffinet 192.168.126.132/24 brd 192.168.126.255 scope global noprefixroute dynamic eno16777736valid_lft 1251sec preferred_lft 1251secinet 192.168.126.141/24 scope global secondary eno16777736valid_lft forever preferred_lft foreverinet 192.168.126.142/24 scope global secondary eno16777736valid_lft forever preferred_lft foreverinet 192.168.126.143/24 scope global secondary eno16777736valid_lft forever preferred_lft foreverinet6 fe80::20c:29ff:fe60:18fd/64 scope link noprefixroute valid_lft forever preferred_lft forever

2)编辑配置文件,指明虚拟主机的ip地址

[root@www conf]# vim nginx.conf
server {listen       192.168.126.141:80;server_name  localhost;location / {root   /test/web1;index  index.html index.htm;}}server {listen       192.168.126.142:80;server_name  localhost;location / {root   /test/web2;index  index.html index.htm;}}server {listen       192.168.126.143:80;server_name  localhost;location / {root   /test/web3;index  index.html index.htm;}}

3)重载配置文件

[root@www conf]# /usr/local/nginx/sbin/nginx -s reload
[root@www conf]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      11615/nginx: master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      6762/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      6861/master
tcp6       0      0 :::22                   :::*                    LISTEN      6762/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      6861/master
udp        0      0 0.0.0.0:68              0.0.0.0:*                           6470/dhclient
[root@www conf]# 

4)在浏览器中输入ip地址查看虚拟主机

7、基于不同主机名的虚拟主机配置
1)修改主机的hosts文件,添加对应记录

[root@www conf]#
[root@www conf]# vim /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.126.141  www.web1.com
192.168.126.142  www.web2.com
192.168.126.143  www.web3.com

2)编辑主配置文件,添加主机名

    server {listen       192.168.126.141:80;server_name  www.web1.com;location / {root   /test/web1;index  index.html index.htm;}}server {listen       192.168.126.142:80;server_name  www.web2.com;location / {root   /test/web2;index  index.html index.htm;}}server {listen       192.168.126.143:80;server_name  localhost;location / {root   /test/web3;index  index.html index.htm;}}

3)重载服务并查看服务

[root@www conf]# /usr/local/nginx/sbin/nginx -s reload
[root@www conf]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      11615/nginx: master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      6762/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      6861/master
tcp6       0      0 :::22                   :::*                    LISTEN      6762/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      6861/master
udp        0      0 0.0.0.0:68              0.0.0.0:*                           6470/dhclient
[root@www conf]# 

4)在windows主机上添加hosts记录
文件路径:C:\Windows\System32\drivers\etc

5)在浏览器中查看主页

Nginx编译安装与虚拟主机配置相关推荐

  1. Nginx安装与虚拟主机配置shell脚本

    今天继续给大家介绍Linux运维相关知识,本文主要内容是Nginx安装与虚拟主机配置shell脚本. 一.NGINX安装 在今天的脚本上,我们开始尝试使用函数和参数,以增强脚本的灵活性和实现脚本的模块 ...

  2. Nginx——安装与虚拟主机配置(域名非80端口问题)

    一.引言 因为甲方提出问题:一个服务器与IP,两个域名a.b分别对应两个要部署的网站,这个一般是一个域名a对应一个主机服务器ip的默认80端口,另外的网站只能用其他端口(如b:8080对应主机ip:8 ...

  3. nginx 多个root_nginx虚拟主机配置

    nginx 虚拟机配置 什么是虚拟主机? 虚拟主机是一种特殊的软硬件技术,它可以将网络上的每一台计算机分成多个虚拟主机,每个虚拟主机可以独立对外提供www服务,这样就可以实现一台主机对外提供多个web ...

  4. 在window 10 x64下Apache24的下载、安装及虚拟主机配置(以wordpress为例)

    什么是Apache 关于Apache是什么及与tomcat的区别联系见上一篇文章,这里我们只讲window下的Apache web服务器的安装及虚拟主机的配置. Apache下载 (1)打开百度,搜索 ...

  5. Nginx(二) 虚拟主机配置

    一.Nginx的应用概述 Nginx作为一款高性能的http服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器.主要有以下3方面的应用: 1.http服务器: Nginx是一个http服 ...

  6. Nginx 服务 (编译安装--访问控制--虚拟主机)详解

    文章目录 一.Nginx 服务基础 1.1.Nginx 概述 1.2.Nginx 的编译安装 1.2.1.编译安装步骤 1.2.2.使用systemctl控制 1.2.3.开启nginx,关闭防火墙 ...

  7. Apache源码安装和虚拟主机配置

    源码安装Apache 1.上传Apache源码安装所需软件包 2.安装: 安装顺序 apr->apr-util->pcre->httpd 安装编译环境 yum -y install ...

  8. nginx作为tcp代理 虚拟主机配置 模板

    # tcp协议虚拟主机的配置文件模板 # cat /usr/local/nginx/conf/tcp/tcp.test.com.conf user nginx; worker_processes au ...

  9. nginx 最简单的虚拟主机配置

    server{ //监听端口 listen 80; //设置字符集 charset utf-8; //网站根目录 root /var/www/kuku; //默认读取文件 index index.ht ...

最新文章

  1. Mybatis入门:3(动态sql)
  2. 什么软件测试身高体重标准,测测你的身高体重指数(BMI)正常吗?
  3. 进程和线程(通信方式)、调度算法(6种)
  4. 【JQuery】 触发元素的change事件
  5. 3 微信公众号开发 接受普通消息
  6. Docker(十七)-修改Docker容器启动配置参数
  7. JEECMS站群管理系统-- 标签的配置流程
  8. ansible的命令操作模块6
  9. Pytorch学习笔记总结
  10. 智能优化算法应用:基于麻雀搜索算法PID参数优化 - 附代码
  11. JAVA计算机毕设题目大全
  12. 复印机扫描仪错误怎么回事_打印机扫描后出现错误怎么处理?
  13. 改进YOLOv7系列:23.YOLOv7添加CBAM注意力机制
  14. 计算机系统与维护专科毕业论文,计算机系统维护毕业设计论文
  15. 解决搜狗输入法默认问题
  16. 未来的学习目标-C/C++/Linux服务器开发高级架构
  17. python自动点赞_python3 爬虫学习:自动给你心上人的微博点赞(二)
  18. 简要介绍一下Dos/Windows格式文件和Unix/Linux格式文件(剪不断理还乱的\r\n和\n)
  19. 朴素贝叶斯情感分析评分python_「豆瓣影评」从爬取豆瓣影评到基于朴素贝叶斯的电影评论情感分析(上) - seo实验室...
  20. VR系列——Oculus Audio sdk文档:一、虚拟现实音频技术简介(1)——概述

热门文章

  1. CoAP协议学习——CoAP基础
  2. word编辑中空格变成灰点
  3. are exo exo是什么歌 we_We Are One EXO!
  4. C++线程池原理及创建
  5. 整除分块 B - Make Divisible
  6. iOS 九宫格键盘的UIKeyboardTypeNumbersAndPunctuation默认类型
  7. ASP.NET增加微信公众号功能
  8. 长相一般的普通程序员怎么找到喜欢程序员的妹子做女友?
  9. 程序员是一种优秀的男朋友
  10. 银行不良资产收益权转让 模式大起底