Hi, I was trying to set Gerrit authentication type to http. Here is
my httpd.conf file's content:
NameVirtualHost hostname:8080
<VirtualHost hostname:8080>
ServerName
hostname.domain.com
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
AuthUserFile /back/passwd
</Location>
ProxyPass /
http://127.0.0.1:8080/
ProxyPassReverse /
http://127.0.0.1:8080/
</VirtualHost>
And the gerrit.config file:
[gerrit]
basePath = git
[database]
type = H2
database = db/ReviewDB
[auth]
type = HTTP
[container]
user = gerrituser
javaHome = /usr/lib/jvm/java-6-openjdk/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-http://*:8080/
[cache]
directory = cache
but I get the following error when i visit
http://hostname:8080/
"...............................................................error
info.............................................................
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 '/':
<VirtualHost kona-gerrit:8080>
ServerName kona-gerrit
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
...
</Location>
ProxyPass / http://.../
</VirtualHost>
"....................................................................end
of error
info........................................................................
Am I missing something here. Or how should i write the configuration
file?
Thank you!