Ubuntu18.04 搭建 SVN
Pin Young Lv9

安装svn

依赖nginx代理转向域名

  • vi /etc/nginx/conf.d/svn_nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
server {
# 监听 80 端口
listen 80;
autoindex on;
server_name svn.tdou.cc;
access_log /var/log/nginx/svn_access.log;
error_log /var/log/nginx/svn_error.log;
index index.html index.htm index.jsp index.php;
if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
}
location / {
# 反向代理到 8080 端口
proxy_pass http://127.0.0.1:3690;
add_header Access-Control-Allow-Origin *;
}
}