```bashbash # /etc/apache2/conf.d/repos # Apache HTTP Server 2.4
<Directory /var/www/repos/ > # We want the user to be able to browse the directory manually Options Indexes FollowSymLinks Multiviews Require all granted </Directory>
# This syntax supports several repositories, e.g. one for Debian, one for Ubuntu. # Replace * with debian, if you intend to support one distribution only. <Directory "/var/www/repos/*/*/db/"> Require all denied </Directory>
<Directory "/var/www/repos/*/*/conf/"> Require all denied </Directory>
<Directory "/var/www/repos/*/*/incoming/"> Require all denied </Directory> ```
- 修改 80 端口主页指向 apt 仓库地址:
`sudo vi /etc/apache2/sites-available/000-default.conf`
`DocumentRoot /var/www/repos/apt`
### 创建 APT 仓库
首先创建一个仓库用的文件夹,名字没有特定要求。在其中创建一个文件夹`conf`,
- 在`conf`文件夹中创建一个`distributions`文本文件,如下格式:
```bash Origin: Linux Deepin Label: Deepin Codename: fou Version: 2019 Update: fou Architectures: amd64 arm64 mips64el sw_64 source Components: main UDebComponents: main Contents: percomponent nocompatsymlink .bz2 SignWith: devicepackages@uniontech.com Description: Deepin debian packages