ubuntu安装gerrit HTTPd Configuration Error 多端口配置
2015-11-11 15:48
951 查看
在ubuntu上配置好gerrit后,出现代理问题
gerrit.config如下:
2./etc/apache2/httpd.conf 之前的配置为
访问本机http://192.168.0.60:8083/ ,提示
Configuration Error
Check the HTTP server’s authentication settings.
The HTTP server did not provide the username in the Authorization header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with ‘/’:
改为配置多端口来解决。
1. 首先在/etc/apache2/ports.conf中添加
NameVirtualHost *:8084
Listen 8084
2. 配置/etc/apache2/httpd.conf:
打开http://192.168.0.60:8084/#/,会跳转到http://192.168.0.60:8083/#/中进行登录。
配置完毕。
gerrit.config如下:
[gerrit] basePath = git canonicalWebUrl = http://192.168.0.60:8083/ [database] type = h2 database = db/ReviewDB [auth] type = HTTP [sendemail] smtpServer = localhost [container] user = gerrit javaHome = /usr/lib/jvm/jdk1.7.0_65/jre [sshd] listenAddress = *:29418 [httpd] listenUrl = proxy-http://192.168.0.60:8083/ [cache] directory = cache
2./etc/apache2/httpd.conf 之前的配置为
<VirtualHost *> ServerName localhost ProxyRequests Off ProxyVia Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> <Location /login > AuthType Basic AuthName "Gerrit Code Review" Require valid-user AuthBasicProvider file AuthUserFile /home/gerrit/review_site/etc/passwords </Location> AllowEncodedSlashes On ProxyPass / http://192.168.0.60:8083/ </VirtualHost>
访问本机http://192.168.0.60:8083/ ,提示
Configuration Error
Check the HTTP server’s authentication settings.
The HTTP server did not provide the username in the Authorization header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration includes an authorization directive with the proper location, ensuring it ends with ‘/’:
改为配置多端口来解决。
1. 首先在/etc/apache2/ports.conf中添加
NameVirtualHost *:8084
Listen 8084
2. 配置/etc/apache2/httpd.conf:
<VirtualHost *:8084> ServerName localhost ProxyRequests Off ProxyVia Off ProxyPreserveHost On <Proxy *:8084> Order deny,allow Allow from all </Proxy> <Location /login > AuthType Basic AuthName "Gerrit Code Review" Require valid-user AuthBasicProvider file AuthUserFile /home/gerrit/review_site/etc/passwords </Location> AllowEncodedSlashes On ProxyPass / http://192.168.0.60:8083/ </VirtualHost>
打开http://192.168.0.60:8084/#/,会跳转到http://192.168.0.60:8083/#/中进行登录。
配置完毕。
相关文章推荐
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。
- 网络营销联盟
- SSL/TLS 加密新纪元 - Let's Encrypt
- 扫盲 HTTPS 和 SSL/TLS 协议[1]:背景知识、协议的需求、设计的难点
- 解决chrome下https无法打开方法
- BAT解密:互联网技术发展之路(7)- 网络层技术剖析
- C++ 用libcurl库进行http通讯网络编程
- javaweb学习总结(七)——HttpServletResponse对象(一)
- java socket UDP 网络发现
- http Cookie
- 反向传播神经网络极简入门
- ASIHTTPRequest
- http://www.jb51.net/article/37462.htm
- HTTP协议 代理
- SSH隧道应用, 突破网络限制
- HTTP协议 缓存
- HTTP协议 (三) 压缩
- HttpClient--HttpClient的Post请求
- HTTP协议 (二) 基本认证
- HttpClient--HttpClient的Get请求方式