nginx 做svn代理,nginxsvn代理


1、编译安装 nginx

tar -zxvf nginx-1.6.3.tar.gz

cd nginx-1.6.3

./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid

make

make install

2、配置

比如我的svn试用http协议访问,地址如下http://192.168.1.2:18080/svn/doc

cd /usr/local/nginx/nginx/conf

vim /usr/local/nginx/nginx.conf

在http {

 

}中增加

 

       upstream myser3 {
          #server 192.168.99.1 weight=1;
          server
192.168.1.2:18080 ;
        }
        server{
            listen       90;
           server_name  localhost;
           location /
svn/doc/{
               proxy_pass  http://myser3
/svn/doc/;-
          }
      }

=====================================================

 

 

  http {
       include       mime.types;
       default_type  application/octet-stream;
      sendfile        on;

       keepalive_timeout  65;
       upstream myser3 {
          #server 192.168.99.1 weight=1;
          server
192.168.1.2:18080 ;
        }
        server{
            listen       90;
           server_name  localhost;
           location /
svn/doc/{
               proxy_pass  http://myser3
/svn/doc/;-
          }
      }

}

 

相关内容

    暂无相关文章