0

don't worry about the Ip and user those are just for tests, this server will be destroyed when I'm done.

I'm on debian 9 with apache 2.4.25n this is a remote server, I'm tring to access it from the internet

So I installed gerrit, got it running and put this in his conf file (~/gerrit_server/etc/gerrit.config) :

[gerrit]
        basePath = git
        canonicalWebUrl = http://95.179.219.75:8087/
        serverId = bd679dac-5adf-47c8-b665-84a3ab90ecaa
[container]
        javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
        javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
        user = root
        javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre
[index]
        type = lucene
[auth]
        type = HTTP
[receive]
        enableSignedPush = false
[sendemail]
        smtpServer = localhost
[sshd]
        listenAddress = *:29418
[httpd]
        listenUrl = http://*:8087/gerrit/
[cache]
        directory = cache
[database]
        type = h2
        database = /home/magicmike/gerrit_server/db/ReviewDB
    

Using http://95.179.219.75:8087/gerrit works

Then I added this file : /etc/apache2/sites-available/gerrit And wrote this inside

<VirtualHost *>
  ServerName 95.179.219.75

  ProxyRequests Off
  ProxyVia Off
  ProxyPreserveHost On

  <Proxy *>
    Require all granted
    # Use following line instead of the previous two on Apache >= 2.4
    # Require all granted
  </Proxy>

  AllowEncodedSlashes On
  ProxyPass /gerrit/ http://127.0.0.1:8087/gerrit/ nocanon
</VirtualHost>

then I added a simlink to sites-enabled sudo ln -s /etc/apache2/sites-available/gerrit.conf /etc/apache2/sites-enabled/gerrit.conf

and restarted apache : sudo systemctl restart apache2

Going to http://95.179.219.75/gerrit display : 404 error

I also tried with listenUrl = proxy-http://*:8087/gerrit/ in gerrit's conf it changes nothing (I of course restarted gerrit and apache after that change)

Am I missing something? Thanks.

EDIT

From the apache logs :

[Thu Feb 20 17:21:39.314275 2020] [core:info] [pid 30994:tid 139939108706048] [client 163.62.112.77:16341] AH00128: File does not exist: /var/www/html/gerrit

Why would it want something from /var/www/html/gerrit?

Heetola
  • 101
  • 2

1 Answers1

0

http://95.179.219.75/gerrit/ had to be used not http://95.179.219.75/gerrit (missing '/' at the end)

Heetola
  • 101
  • 2