网站前端培训,国产服务器品牌前十大排名,ps网页设计论文,高端网站建设企业1.环境准备
我使用的说centos7的系统
1.20版本的nginx
另外还有3台虚拟机
主机#xff1a;192.168.163.142
两台服务器#xff1a;服务器A--192.168.163.140 服务器B---192.168.163.141
2.配置服务器A和B
找到nginx下的html目录#xff0c;编辑其中的index.html(在此…1.环境准备
我使用的说centos7的系统
1.20版本的nginx
另外还有3台虚拟机
主机192.168.163.142
两台服务器服务器A--192.168.163.140 服务器B---192.168.163.141
2.配置服务器A和B
找到nginx下的html目录编辑其中的index.html(在此之前可以先进行备份) [rootlocalhost nginx]# find / -name html
/var/www/html
/usr/share/doc/pam-1.1.8/html
/usr/share/doc/pcre-devel-8.32/html
/usr/share/nginx/html
[rootlocalhost nginx]# cd /usr/share/nginx/html
[rootlocalhost html]# ls
50x.html index.html
[rootlocalhost html]# cp index.html index.html.bak
[rootlocalhost html]# ls
50x.html index.html index.html.bak
[rootlocalhost html]# vim index.html服务器A同上。
3.配置nginx的配置文件
找到nginx的配置文件对其进行修改
[rootlocalhost ~]# find / -name nginx
/etc/logrotate.d/nginx
/etc/nginx
/var/log/nginx
/var/cache/nginx
/usr/sbin/nginx
/usr/lib64/nginx
/usr/share/nginx
/usr/libexec/initscripts/legacy-actions/nginx
[rootlocalhost ~]# cd /etc/nginx
[rootlocalhost nginx]# ls
conf.d mime.types nginx.conf uwsgi_params
fastcgi_params modules scgi_params
[rootlocalhost nginx]# vim nginx.conf
[rootlocalhost nginx]# systemctl restart nginx在http{}的模块下添加以下内容进行自定义权重 4.测试 测试成功