root@server1 [/usr]# yum -y install epel-release
Loaded plugins: fastestmirror, tsflags, universal-hooks
Loading mirror speeds from cached hostfile
EA4: 6623237210
base: mirrorslinodecom
extras: mirrorslinodecom
updates: mirrorslinodecom
Resolving Dependencies
--> Running transaction check
---> Package epel-releasenoarch 0:7-5 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================
Package Arch Version Repository Size
========================================================================================
Installing:
epel-release noarch 7-5 extras 14 k
第二步: 安装 nDeploy 的 CentOS RPM 库
可以安装 nDeploy 的 CentOS RPM 库来安装我们所需的 nDeploy Web 类软件和 Nginx 插件
root@server1 [/usr]# yum -y install >#注:proxy_temp_path和proxy_cache_path指定的路径必须在同一分区
proxy_temp_path /data0/proxy_temp_dir;
#设置Web缓存区名称为cache_one,内存缓存空间大小为200MB,1天没有被访问的内容自动清除,硬盘缓存空间大小为30GB。
proxy_cache_path /data0/proxy_cache_dir levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=30g;
#轮询服务器,weight为服务器权重,与访问频率成正比,max_fails最大超时次数,fail_timeout服务器代理监听超时时间
upstream backend_server {
server 19216820343:80 weight=1 max_fails=2 fail_timeout=30s;
server 19216820344:80 weight=1 max_fails=2 fail_timeout=30s;
server 19216820345:80 weight=1 max_fails=2 fail_timeout=30s;
}
server
{
listen 80;
server_name >没办法做这样的反向代理。
除非是
->
->
如果是这样的话,配置是这样的
location /8080 {
proxy_pass ;
proxy_redirect off;
}
location /8000 {
proxy_pass ;
proxy_redirect off;
}
proxy的其它参数就自己设置了,可以参考下
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)