Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling git prevents apache2 from starting #8

Open
digitaldutch opened this issue Jul 16, 2022 · 3 comments
Open

Enabling git prevents apache2 from starting #8

digitaldutch opened this issue Jul 16, 2022 · 3 comments

Comments

@digitaldutch
Copy link

Testing the beta install on Debian 11.

When enabling git for a domain or importing a domain with git, apache2 won’t (re)start.

Jul 12 12:02:54 cloud11.website.com apachectl[11746]: AH00526: Syntax error on line 46 of /etc/apache2/sites-enabled/website.com.conf:
Jul 12 12:02:54 cloud11.website.com apachectl[11746]: Invalid command 'DAV', perhaps misspelled or defined by a module not included in the se>
Jul 12 12:02:54 cloud11.website.com apachectl[11743]: Action 'start' failed.
Jul 12 12:02:54 cloud11.website.com apachectl[11743]: The Apache error log may have more information.
Jul 12 12:02:54 cloud11.website.com systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE

The problem is that the git module adds DAV to the apache config file:
DAV on

Which causes the error at apache2 startup, because mod_dav and mod_dav_fs are not enabled by default.

I understood that DAV is no longer supported. If that is the case enabling git should also no longer add DAV lines to the config files. And git should only be supported through ssh and no longer through DAV. Which also means the git example commands shown should be updated as they right now tell users how to use git through DAV.

As an alternative it might be a good idea to check if mod_dav and mod_davfs are enabled. It looks like there is a check for mod_rewrite. If there was another check for mod_dav and mod_davfs and an exception is thrown when they are not enabled, then at least apache2 would restart properly.

@jcameron
Copy link
Collaborator

I suppose that if the Git module isn't setting up access via HTTP, there isn't much point using it other than for repository management. Unless there's another way to grant HTTP access to a repository?

@digitaldutch
Copy link
Author

Repository management in virtualmin would be rather convenient for me even if connections are only allowed through ssh. If DAV support is removed, the git folder should probably be moved out of the public_html folder.

That or enabling mod_dav with a big fat warning that it is not quite secure on a shared server.

@jcameron
Copy link
Collaborator

Is it possible to have read-only access to a Git repository via HTTP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants