nginx代理svn

最近Linux访问不到SVN机器 刚好另外一台机器能访问 就进行一下代理了 这里SVN机器是192.168.1.31

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  logs/access.log  main;

    sendfile        on;
    keepalive_timeout  65;
    server {
        listen          8000;
        location / {
        proxy_pass http://192.168.1.31:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Cookie $http_cookie;
        client_max_body_size 5000M;
        }
}
}

 

posted on 2021-12-20 16:56  弘道者  阅读(1387)  评论(0编辑  收藏  举报