微服务架构实战:Nginx的安装及负载均衡配置、开机启动

编辑下列各项内容:

#日志目录

base path=/tmp

#跟踪服务器

tracker server=10.10.10.22:22122tracker server=10.10.10.32:22122#URL中是否有group名称

url have group name = true#storage path的个数

store_path_count=2

store_path0=/data/fdfs_storage/storage0store_pathl=/data/fdfs_storage/storage1

使用如下命令编辑Nginx配置文件:

vi /data/nginx/ conf/nginx.conf

文件的内容如下所示:

user nginx nginx;

worker processes 2;

#pid/usr/local/nginx/logs/nginx.pid;worker rlimit_nofile 1024;

events {

use epoll;

worker connections 1024;

}

http {

include mime.types;

server names hash bucket size 128;client header buffer_size 32k;

largeclient header buffers 432k;client max body size 20m;

limit rate 1024k;

default type application/octet-stream;

log format main ‘$remote addr -

你可能感兴趣的:(程序员,面试,java,后端)