1、安装软件
请按照中科方德技术人员给的软件包以及文档安装nginx软件。
2、nginx配置文件修改
2.1 打开配置文件
进入配置文件所在目录
打开配置文件
2.2 修改相关内容到配置文件
添加内容一
1 2 3 4 5 6 7 8
| client_max_body_size 2000m;
upstream apusic_hosts { ip_hash; server 172.16.44.127:6999; server 172.16.44.128:6999; server 172.16.44.129:6999; }
|
注:
server后面的ip需要进行根据地址进行修改
添加内容二
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # root html; # index index.html index.htm; # proxy_pass http://apusic_hosts; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_redirect default; proxy_buffer_size 2048k; proxy_buffers 6 2048k; proxy_busy_buffers_size 2048k; proxy_temp_file_write_size 20
|
2.3 内容添加的位置

2.4 修改后

3、重启服务
启动nginx
1
| systemctl start nginx.service
|
重新启动Nginx
1
| systemctl restart nginx.service
|
重新加载Nginx
1
| systemctl reload nginx.service
|