Hi,
I configured Reverse-proxy for gerrit but got this HTTP error:
HTTP ERROR 403
Problem accessing /login/mine. Reason:
Forbidden
It seems thar Jetty try to authenticate not Apache HTTP.
The configurations in http.conf is:
# Setting ProxyRequests On turns your server into an Open Proxy.
ProxyRequests Off
# When enabled, this option will pass the Host: line from the incoming
request to the proxied host,
# instead of the hostname specified in the proxypass line.
ProxyPreserveHost On
# access
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# This directive allows remote servers to be mapped into the space of
the local server
ProxyPass /gerrit
http://172.17.27.186:8082/
# This directive lets Apache adjust the URL in the Location header on
HTTP redirect responses.
ProxyPassReverse /gerrit
http://localhost:8082/
# rewrite absolute URLs to /gerrit
ProxyHTMLURLMap
http://localhost:8082/ /gerrit
<Location /gerrit/>
ProxyHTMLURLMap / /gerrit/
</Location>
# access
<Location /gerrit>
AuthType Basic
AuthName "Gerrit Review Server"
AuthUserFile /review_site/access/passwd
Require valid-user
</Location>
and the gerrit.conf file:
[gerrit]
basePath = C:\\git_repos
[database]
type = H2
database = db/ReviewDB
[auth]
type = HTTP
[sendemail]
smtpServer = 172.17.27.186
smtpServerPort = 25
smtpUser = Administrator
[container]
user = Administrator
javaHome = C:\\Program Files\\Java\\jdk1.6.0_12\\jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = proxy-
http://172.17.27.186:8082
[cache]
directory = cache
Does anyone use HTTP authentication? Any clues?
regards,
On Apr 28, 9:50 pm, Furosh One <
fur...@gmail.com> wrote:
> > Since right now my intention is to check Gerrit and use it
> > irrespective of the authentication method. I tried out with http
> > authentication, here also I was not able to log in
> > I am getting a error message
> > HTTP ERROR 403
> > Problem accessing /login/admin,projects. Reason:
> > Forbidden
> > Powered by Jetty://
>
> > Is there any guide for dummies for installing gerrit
> > thanks
> > Joseph John
>
> I don't know much about ldap configuration but I do have a working
> HTTP-auth config for my default gerrit server.
> I have a NIS domain that I'm grabbing all usernames & passwords from
> in our corporation. I have a script that collects this and basically
> grabs username:password and outputs to a file in
> /home/gerrit2/review_site/access/passwd file.
>
> I am also using thereverse-proxysetup here, so I can have HTTPD
> authenticate users then pass it over to Jetty/Gerrit service (on the
> same server) once authentication has been met. Use what you can from
> here and take what you don't need out.
>
> My httpd.conf:
> ===========
> <VirtualHost *>
> ServerName
gerrit1.mydomain.com
>
> ProxyRequests Off
> ProxyVia Off
> ProxyPreserveHost On
>
> <Location "/ssh_info">
> ProxyPasshttp://
127.0.0.1:8081/ssh_info
> Allow from all
> Satisfy Any
> </Location>
>
> <Location "/">
> AuthType Basic
> AuthName "Gerrit Review Server"
> #AuthName "Gerrit Code Review"
> AuthUserFile /home/gerrit2/review_site/access/passwd
> Require valid-user
> </Location>
>
> <Proxy*>
> Order deny,allow
> Allow from all
> </Proxy>
>
> #ProxyPass /r/
http://127.0.0.1:8081/r/
> ProxyPass /
http://127.0.0.1:8081/
>
> <IfModule mod_disk_cache.c>
> CacheEnable disk /
> CacheIgnoreHeaders Set-Cookie
> </IfModule>
> </VirtualHost>
>
> gerrit.config:
> =========
> [gerrit]
> basePath = /git/projects/
> #canonicalWebUrl =
http://gerrit1.mydomain.com:8080/# took
> out because not in DNS.
> [database]
> type = POSTGRESQL
> hostname = localhost
> database = reviewdb
> username = gerrit2
> [auth]
> type = HTTP
> emailformat = {...@
domain.com
> [sendemail]
> smtpServer = localhost
> [container]
> user = gerrit2
> javaHome = /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
> [sshd]
> listenAddress = *:29418
> [httpd]
> #listenUrl =proxy-
http://127.0.0.1:8081/r/
> listenUrl =proxy-
http://127.0.0.1:8081/