ubuntu18,svn copy 建立分支时报 “Unexpected HTTP status 502 Bad Gateway on ”的解决

在ubuntu 18 上安装了apache2+svn+svnadmin +nginx 采用nginx https转http的方式访问svn
在客户端建立分支时,提示错误:Unexpected HTTP status 502 'Bad Gateway' on ....
查找网络上的方法,采用如下步骤解决:
1、在apache2的配置目录下找到000-default.conf,(也就是 所在的文件)
   增加一行:RequestHeader edit Destination ^https http early
 

	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html
   

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
 
	
 	RequestHeader edit Destination ^https http early

 
保存后重新启动apache2 :# service apache2 restart
结果启动apache2 失败,查看日志报:Invalid command 'RequestHeader', perhaps misspelled or defined by a module
于是在网上一番查找,最终执行第二步问题解决。

2、执行下面命令来开启header:

# sudo a2enmod headers
# service apache2 restart

重新启动apache2 成功后,svn新建分支成功!

 

 

 

你可能感兴趣的:(服务器配置)