GitLab API and {"message":"404 File Not Found"}

Viewed 306

I have a problem with the GitLab API, I can only download files that are in the root directory. If the file is nested in some additional directory / directories, the error {"message": "404 File Not Found"} is displayed. I found out that this is caused by wrong reverse proxy settings, but my settings seem to be correct. Could someone have a look at my config below? Do you have any suggestions?

<VirtualHost *:443>
  SSLEngine on
  SSLProtocol all -SSLv2
  SSLHonorCipherOrder on
  SSLCipherSuite "ECDH+AESGCM:DH+AESGM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS"
  Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
  SSLCompression Off
  SSLCertificateFile /etc/apache2/ssl.crt/gitlabserver.crt
  SSLCertificateKeyFile /etc/apache2/ssl.key/gitlabserver.key

  ServerName gitlabserver.local
  ServerSignature Off
  ProxyRequests Off
  ProxyPreserveHost On
  AllowEncodedSlashes NoDecode

  <Location />
    Require all granted
    ProxyPass http://127.0.0.1:8181/ nocanon
    ProxyPass http://gitlabserver.local/ nocanon
    ProxyPassReverse http://127.0.0.1:8181/
    ProxyPassReverse http://gitlabserver.local/
  </Location>

      RewriteEngine on
      RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
      RewriteCond %{REQUEST_URI} ^/uploads/.*
      RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]

      RequestHeader set X_FORWARDED_PROTO 'https'
      RequestHeader set X-Forwared-Ssl on

     DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public


     ErrorDocument 404 /404.html
     ErrorDocument 422 /422.html
     ErrorDocument 500 /500.html
     ErrorDocument 502 /502.html
     ErrorDocument 503 /503.html


     LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
     ErrorLog /var/log/apache2/gitlabserver_error.log
     CustomLog /var/log/apache2/gitlabserver_forwarded.log common_forwarded
     CustomLog /var/log/apache2/gitlabserver_access.log combined env=!dontlog
     CustomLog /var/log/apache2/gitlabserver.log combined

</VirtualHost>

0 Answers
Related