You are not logged in.

#1 2021-08-10 15:53:14

thomasbb
Member
Registered: 2020-05-22
Posts: 52

[SOLVED] where to put git files for the Apache server to find them?

On a computer, I have a bare repository which I can access from another computer with both protocols git and ssh, but with http it fails. Where to copy my directory? The links:

ls -s /my/repo /var/www/html/repo-link
ls -s /my/repo /var/www/git/repo-link

as in Red Hat and Debian based distributions won't work

Last edited by thomasbb (2021-08-10 22:17:01)

Offline

#2 2021-08-10 17:56:25

Shawn8901
Member
Registered: 2013-05-07
Posts: 38

Re: [SOLVED] where to put git files for the Apache server to find them?

Hi,
when you check the wiki page for apache it points out, that the DocumentRoot should be /srv/http, whilst some distros (like debian) let it point to /var/www.

https://wiki.archlinux.org/title/Apache … figuration

You should check the configuration file /etc/httpd/conf/httpd.conf and check the configuration, which points to the DocumentRoot of your server (depending on the configuration which is active for you).

edit: also in your first ln command there may be a typo (htm => html ?)

Last edited by Shawn8901 (2021-08-10 17:57:06)

Offline

#3 2021-08-10 19:56:20

thomasbb
Member
Registered: 2020-05-22
Posts: 52

Re: [SOLVED] where to put git files for the Apache server to find them?

Hi,
It was html in my history but I made a bad copy-paste in the post. It's corrected
So I tried both links:

sudo ln -s /tmp/my-remote-git-repo /srv/http/git/my-remote-git-repo
sudo ln -s /tmp/my-remote-git-repo /srv/http/my-remote-git-repo

but the commands

git clone https://127.0.0.1/my-remote-git-repo my-remote-git-repo-2
git clone https://127.0.0.1:/my-remote-git-repo my-remote-git-repo-2

answer

Cloning into 'my-remote-git-repo-2'...
fatal: unable to access 'https://127.0.0.1/my-remote-git-repo/': Failed to connect to 127.0.0.1 port 443 after 0 ms: Connection refused

Last edited by thomasbb (2021-08-10 19:57:29)

Offline

#4 2021-08-10 20:08:52

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] where to put git files for the Apache server to find them?

There doesn't seem to be a listener on port 443. Did you set up https at all?  How?

Offline

#5 2021-08-10 20:58:55

thomasbb
Member
Registered: 2020-05-22
Posts: 52

Re: [SOLVED] where to put git files for the Apache server to find them?

If I call http instead of https, the same happens. And for the httpd service, I just installed the apache package without further configuration

Last edited by thomasbb (2021-08-10 21:00:42)

Offline

#6 2021-08-10 21:16:14

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] where to put git files for the Apache server to find them?

Check your Apache config. IIRC it doesn't follow symlinks without extra configuration.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2021-08-10 22:12:17

thomasbb
Member
Registered: 2020-05-22
Posts: 52

Re: [SOLVED] where to put git files for the Apache server to find them?

If I make a copy of the repository under either /srv/http or /srv/http/git, it still doesn't work it works for the http protocol (and not for the https protocol).
Solved, thank you for your help

Last edited by thomasbb (2021-08-10 22:14:47)

Offline

Board footer

Powered by FluxBB