| Giorgi Lekveishvili | 285ab62 | 2023-11-22 13:50:45 +0400 | [diff] [blame^] | 1 | <VirtualHost *:80> |
| 2 | # The ServerName directive sets the request scheme, hostname and port that |
| 3 | # the server uses to identify itself. This is used when creating |
| 4 | # redirection URLs. In the context of virtual hosts, the ServerName |
| 5 | # specifies what hostname must appear in the request's Host: header to |
| 6 | # match this virtual host. For the default virtual host (this file) this |
| 7 | # value is not decisive as it is used as a last resort host regardless. |
| 8 | # However, you must set it for any further virtual host explicitly. |
| 9 | ServerName localhost |
| 10 | ServerAdmin webmaster@localhost |
| 11 | |
| 12 | UseCanonicalName On |
| 13 | |
| 14 | AllowEncodedSlashes On |
| 15 | |
| 16 | SetEnv GIT_PROJECT_ROOT /var/gerrit/git |
| 17 | SetEnv GIT_HTTP_EXPORT_ALL |
| 18 | ScriptAliasMatch "(?i)^/a/projects/(.*)" "/var/cgi/project_admin.sh" |
| 19 | ScriptAlias / /usr/libexec/git-core/git-http-backend/ |
| 20 | ScriptLog logs/cgi.log |
| 21 | |
| 22 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, |
| 23 | # error, crit, alert, emerg. |
| 24 | # It is also possible to configure the loglevel for particular |
| 25 | # modules, e.g. |
| 26 | LogLevel debug authz_core:warn |
| 27 | |
| 28 | # Don't log probe requests performed by kubernetes |
| 29 | SetEnvIFNoCase User-Agent "^kube-probe" dontlog |
| 30 | |
| 31 | ErrorLog ${APACHE_LOG_DIR}/error.log |
| 32 | CustomLog ${APACHE_LOG_DIR}/access.log combined env=!dontlog |
| 33 | |
| 34 | # For most configuration files from conf-available/, which are |
| 35 | # enabled or disabled at a global level, it is possible to |
| 36 | # include a line for only one particular virtual host. For example the |
| 37 | # following line enables the CGI configuration for this host only |
| 38 | # after it has been globally disabled with "a2disconf". |
| 39 | #Include conf-available/serve-cgi-bin.conf |
| 40 | <Files "git-http-backend"> |
| 41 | AuthType Basic |
| 42 | AuthName "Restricted Content" |
| 43 | AuthUserFile /var/apache/credentials/.htpasswd |
| 44 | Require valid-user |
| 45 | </Files> |
| 46 | <Files "create_repo.sh"> |
| 47 | AuthType Basic |
| 48 | AuthName "Restricted Content" |
| 49 | AuthUserFile /var/apache/credentials/.htpasswd |
| 50 | Require valid-user |
| 51 | </Files> |
| 52 | <Files "project_admin.sh"> |
| 53 | AuthType Basic |
| 54 | AuthName "Restricted Content" |
| 55 | AuthUserFile /var/apache/credentials/.htpasswd |
| 56 | Require valid-user |
| 57 | </Files> |
| 58 | </VirtualHost> |