• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue http(s) git 404 when using nginx only

TobiasP

Regular Pleskian
---------------------------------------------------------------
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Version 17.0.17 Update #9, Debian 8.6 x64
Git Extension Version 1.0 Release 186

PROBLEM DESCRIPTION
When trying to access the git repository via https or http you get an 404 error if proxy mode (Apache & nginx Settings -> proxy mode) is disabled.

Example for url:
https://user@domain/plesk-git/repo.git
Nginx error:
16245#0: *2042 open() "/var/www/vhosts/domain/webroot/plesk-git/repo.git/info/refs" failed (2: No such file or directory)

STEPS TO REPRODUCE
Disable proxy mode under Apache & nginx Settings -> proxy mode - try to access a git repository via http or https -> 404 error
enable proxy mode (you can also enable Smart static files processing and Serve static files directly by nginx)
-> git repo can be accessed.

ACTUAL RESULT
404 error when trying to access e.g. https://user@domain/plesk-git/repo.git

EXPECTED RESULT
getting asked for login credentials and then be able to access the repository

ANY ADDITIONAL INFORMATION
I guess there are the proper rewrite rules missing when using nginx in "non proxy mode"
--------------------------------------------------------------
 
Last edited:
Thank you for report. I have submitted corresponding bugreport PPP-27159
 
I stumbled across that issue today and fixed it for me by copying the "location /" & "location /internal-nginx-static-location/" blocks from /var/www/vhosts/system/xxx.domain.xxx/conf/nginx.conf while Proxy mode enabled. Then disable Proxy mode and paste the blocks into the "Additional nginx directives"-textarea. Just change "location /" to "location /plesk-git/" and git-requests continue to get proxied to Apache.
 
Back
Top