使用 Apache 安装 TaskBoard 并允许在 Debian 11 上加密 SSL使用 Apache 安装 TaskBoard 并允许在 Debian 11 上加密 SSL使用 Apache 安装 TaskBoard 并允许在 Debian 11 上加密 SSL使用 Apache 安装 TaskBoard 并允许在 Debian 11 上加密 SSL
  • 业务
  • 目标
  • 支持
  • 登录
找到的结果: {phrase} (显示: {results_count} 共: {results_count_total})
显示: {results_count} 共: {results_count_total}

加载更多搜索结果...

搜索范围
模糊匹配
搜索标题
搜索内容

使用 Apache 安装 TaskBoard 并允许在 Debian 11 上加密 SSL

发表 admin at 2025年2月28日
类别
  • 未分类
标签

在此页

  1. 先决条件
  2. 开始
  3. 安装 Apache、PHP 和 Sqlite
  4. 下载任务板
  5. 为任务板配置 Apache
  6. 访问任务板
  7. 使用 Lets Encrypt SSL 保护任务板
  8. 结论

TaskBoard 是一个免费的开源看板应用程序,用于跟踪需要完成的事情。它是一个基于 PHP 的自托管应用程序,可帮助您跟踪所有任务。它提供了一个简单且用户友好的 Web 界面来管理您的所有任务。团队或组织使用它来表示工作及其完成路径。

特征

  • 免费和开源
  • 无限看板
  • 安装简单
  • 轻松定制
  • REST 风格的 API
  • 基本用户管理

在本教程中,我将向您展示如何在 Debian 11 上安装任务板。

先决条件

  • 运行 Debian 11 的服务器。
  • 用您的服务器 IP 指向的有效域名。
  • 在服务器上配置了根密码。

入门

在开始之前,最好将系统包更新到更新版本。您可以通过运行以下命令来更新所有这些:

apt-get update -y

更新所有包后,您可以继续下一步。

安装 Apache、PHP 和 Sqlite

首先,您需要在服务器上安装 Apache Web 服务器、PHP、SQLite 和其他所需的依赖项。您可以通过运行以下命令来安装所有这些:

apt-get install apache2 sqlite3 php libapache2-mod-php php-cli php-common php-json php-readline php-sqlite3 libaio1 libapr1 libhtml-template-perl libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1 libdbi-perl libterm-readkey-perl curl libwrap0 unzip wget -y

安装所有软件包后,启动 Apache 服务并使其在系统重启时启动:

systemctl start apache2
systemctl enable apache2

完成后,您可以继续下一步。

下载任务板

首先,使用以下命令下载最新版本的任务板:

curl -s https://api.github.com/repos/kiswa/TaskBoard/releases/latest |grep browser_download_url | cut -d '"' -f 4 | wget -i -

下载完成后,使用以下命令将下载的文件解压缩到 Apache Web 根目录:

unzip TaskBoard_v*.zip -d /var/www/html/taskboard

接下来,在 Taskboard 目录上设置适当的所有权和权限:

chown -R www-data:www-data /var/www/html/taskboard
chmod -R 775 /var/www/html/taskboard

完成后,您可以继续下一步。

为任务板配置 Apache

接下来,您需要为 Taskboard 创建一个 Apache 虚拟主机配置文件。您可以通过运行以下命令来创建它:

nano /etc/apache2/sites-available/taskboard.conf

添加以下行:

<VirtualHost *:80>
    ServerAdmin 
    DocumentRoot "/var/www/html/taskboard"
    ServerName taskboard.example.com
    <Directory "/var/www/html/taskboard">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog "/var/log/apache2/taskboard-error_log"
    CustomLog "/var/log/apache2/taskboard-access_log" combined
</VirtualHost>

完成后保存并关闭文件,然后使用以下命令启用 Apache 虚拟主机:

a2ensite taskboard.conf

接下来,启用 Apache 重写模块并使用以下命令重新启动 Apache Web 服务:

a2enmod rewrite
systemctl restart apache2

您现在可以使用以下命令检查 Apache 服务的状态:

systemctl status apache2

您将获得以下输出:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-11-06 14:46:54 UTC; 5s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 23704 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 23709 (apache2)
      Tasks: 6 (limit: 4679)
     Memory: 15.3M
        CPU: 110ms
     CGroup: /system.slice/apache2.service
             ??23709 /usr/sbin/apache2 -k start
             ??23710 /usr/sbin/apache2 -k start
             ??23711 /usr/sbin/apache2 -k start
             ??23712 /usr/sbin/apache2 -k start
             ??23713 /usr/sbin/apache2 -k start
             ??23714 /usr/sbin/apache2 -k start

Nov 06 14:46:54 debian11 systemd[1]: Starting The Apache HTTP Server...

完成后,您可以继续下一步。

访问任务板

此时,Taskboard 已安装并配置完毕。现在,打开您的 Web 浏览器并使用 URL http://taskboard.example.com 访问任务板。您将被重定向到任务板登录页面:

提供默认管理员用户名和密码 admin/admin,然后单击“登录”按钮。您应该在以下页面上看到任务板仪表板:

现在,单击“设置”按钮以更改任务板的默认管理员密码。您应该会看到以下页面:

提供您的新管理员密码,然后单击“更改密码”按钮以应用更改。

使用 Lets Encrypt SSL 保护任务板

如果您想使用 Lets Encrypt SSL 保护您的任务板,您将需要安装 Certbot 客户端包并为您的任务板管理 Lets Encrypt SSL。

您可以通过运行以下命令来安装它:

apt-get install python3-certbot-apache -y

安装 Certbot 包后,运行以下命令为您的任务板网站下载并安装 Lets Encrypt SSL。

certbot --apache -d taskboard.example.com

您将被要求提供您的电子邮件并接受服务条款,如下所示:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for taskboard.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/taskboard-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/taskboard-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/taskboard-le-ssl.conf

接下来,选择是否将 HTTP 流量重定向到 HTTPS,如下所示:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

键入 2 并按 Enter 键为您的网站安装 Lets Encrypt SSL:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/taskboard.conf to ssl vhost in /etc/apache2/sites-available/taskboard-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://taskboard.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=taskboard.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/taskboard.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/taskboard.example.com/privkey.pem
   Your cert will expire on 2022-02-7. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

现在,您可以使用 URL https://taskboard.example.com 安全地访问您的网站。

结论

恭喜!您已经成功安装了 Taskboard with Apache 和 Lets Encrypt SSL。您现在可以从中央仪表板创建看板、添加用户、分配任务和管理所有内容。如果您有任何问题,请随时问我。

©2015-2025 Norria support@norria.com