Pro Git 2nd Edition 2.1.413
com/gitproject.git In this particular case, we’re using the /var/www/htdocs path that is common for Apache setups, but you can use any static web server — just put the bare repository in its path. The Git We’ll set this up with Apache as the CGI server. If you don’t have Apache setup, you can do so on a Linux box with something like this: $ sudo apt-get install apache2 apache2-utils 117 $ a2enmod cgi repositories, because the Apache instance running the CGI script will (by default) be running as that user: $ chgrp -R www-data /srv/git Next we need to add some things to the Apache configuration to run0 码力 | 501 页 | 17.96 MB | 1 年前3Gitea v1.21.1 中文文档
在启用HTTPS之前,确保您拥有有效的SSL/TLS证书。 建议在测试和评估情况下使用自签名证书,请运行 gitea cert --host [HOST] 以生成自签名证书 如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 反向代理指南。 要使用Gitea内置HTTPS支持,您必须编辑 app.ini 文件。 1. [server] 2. PROTOCOL = https 3. com 要了解关于配置, 请访问 配置备忘单获取更多信息 按照 reverse proxy guide 的规则设置你的反向代理服务器 然后,按照下面的向导启用 HTTPS: nginx apache2/httpd caddy 注意:仅在代理层启用 HTTPS 被称为 TLS 终止代理。代理服务器接受传入的 TLS 连接,解密内容,然后将现在 未加密的内容传递给 Gitea。只要代理和 Gitea 路由至一个子路 径 使用 Apache HTTPD 作为反向代理服务 反向代理 - 81 - 本文档使用 书栈网 · BookStack.CN 构建 如果您想使用 Apache HTTPD 作为 Gitea 的反向代理服务,您可以为您的 Apache HTTPD 作如下配置(在 Ubuntu 中,配置文件通常在 /etc/apache2/httpd.conf 目录下):0 码力 | 303 页 | 3.88 MB | 1 年前3Pro Git 2nd Edition 2.1.413
com/gitproject.git In this particular case, we’re using the /var/www/htdocs path that is common for Apache setups, but you can use any static web server — just put the bare repository in its path. The Git We’ll set this up with Apache as the CGI server. If you don’t have Apache setup, you can do so on a Linux box with something like this: $ sudo apt-get install apache2 apache2-utils $ a2enmod cgi alias repositories, because the Apache instance running the CGI script will (by default) be running as that user: $ chgrp -R www-data /srv/git Next we need to add some things to the Apache configuration to run0 码力 | 731 页 | 21.49 MB | 1 年前3Pro Git 2nd Edition 2.1.413
com/gitproject.git In this particular case, we’re using the /var/www/htdocs path that is common for Apache setups, but you can use any static web server — just put the bare repository in its path. The Git We’ll set this up with Apache as the CGI server. If you don’t have Apache setup, you can do so on a Linux box with something like this: $ sudo apt-get install apache2 apache2-utils $ a2enmod cgi alias repositories, because the Apache instance running the CGI script will (by default) be running as that user: $ chgrp -R www-data /srv/git Next we need to add some things to the Apache configuration to run0 码力 | 691 页 | 13.35 MB | 1 年前3Pro Git 中文版 第2版 2.1.66
这条命令会在你通过 SSH 向版本库推送之后被执行;然后别人就 可以通过类似下面的命令来克隆: $ git clone https://example.com/gitproject.git 这里我们用了 Apache 里设置了常用的路径 /var/www/htdocs,不过你可以使用任何静态 Web 服务器 —— 只 需要把裸版本库放到正确的目录下就可以。 Git 的数据是以基本的静态文件形式提供的(详情见 在完成以上简单的安装步骤后, 我们将用 Apache 来作为 CGI 服务器。 如果你没有安装 Apache,你可以在 Linux 环境下执行如下或类似的命令来安装: $ sudo apt-get install apache2 apache2-utils $ a2enmod cgi alias env 该操作将会启用 mod_cgi, mod_alias 和 mod_env 等 Apache 模块, 这些模块都是使该功能正常工作所必须 你还需要将 /srv/git 的 Unix 用户组设置为 www-data,这样 Web 服务器才能读写该仓库, 因为运行 CGI 脚 本的 Apache 实例默认会以该用户的权限运行: $ chgrp -R www-data /srv/git 接下来我们要向 Apache 配置文件添加一些内容,来让 git-http-backend 作为 Web 服务器对 /git 路径请 求的处理器。 SetEnv0 码力 | 501 页 | 19.30 MB | 1 年前3Pro Git 中文版 第2版 2.1.66
条命令会在你通过 SSH 向版本库推送之后被执行;然后别人就可以通过类似 下面的命令来克隆: $ git clone https://example.com/gitproject.git 这里我们用了 Apache 里设置了常用的路径 /var/www/htdocs,不过你可以使 用任何静态 Web 服务器 —— 只需要把裸版本库放到正确的目录下就可以。 Git 的数据是以基本的静态文件形式提供的(详情见 在完成以上简单的安装步骤后, 我们将用 Apache 来作为 CGI 服务器。 如果 你没有安装 Apache,你可以在 Linux 环境下执行如下或类似的命令来安装: $ sudo apt-get install apache2 apache2-utils $ a2enmod cgi alias env 该操作将会启用 mod_cgi, mod_alias 和 mod_env 等 Apache 模块, 这些模块 /srv/git 的 Unix 用户组设置为 www-data,这样 Web 服务器才 能读写该仓库, 因为运行 CGI 脚本的 Apache 实例默认会以该用户的权限运 行: $ chgrp -R www-data /srv/git 接下来我们要向 Apache 配置文件添加一些内容,来让 git-http-backend 作 为 Web 服务器对 /git 路径请求的处理器。 SetEnv0 码力 | 670 页 | 13.59 MB | 1 年前3
共 6 条
- 1