root@msm:/etc/apache2# cat httpd.conf <VirtualHost 192.168.10.174:8080> ServerName 192.168.10.174:8080 ProxyRequests Off ProxyVia Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> <Location /login/> AuthType Basic AuthName "Gerrit Code Review" AuthBasicProvider file AuthUserFile /home/gerrit2/review_site/etc/passwords Require valid-user </Location> ProxyPass / http://127.0.0.1:8080/ </VirtualHost>
下面是HTTP配置反向代理
gerrit2@msm:~/review_site$ cat etc/gerrit.config [gerrit] basePath = git canonicalWebUrl = http://192.168.10.174:8080/ [database] type = H2 database = db/ReviewDB [auth] type = http [sendemail] smtpServer = localhost [container] user = gerrit2 javaHome = /usr/local/jdk1.6.0_32/jre [sshd] listenAddress = *:29418 [httpd] listenUrl = proxy-http://*:8080/ [cache] directory = cache