小编myN*_*unt的帖子

为WWW创建A DNS记录后,是否还需要为WWW创建AAAA记录?

我正在使用 A DNS 记录为 IPV4 流量转换 WWW。它看起来像这样:

DNS记录

类型:A

主机名:www.mywebsite.example

值:指向192.168.0.1

我是否需要为 WWW 添加 AAAA 记录以支持 IPv6 流量?

domain-name-system a-record

6
推荐指数
1
解决办法
1966
查看次数

当 MX Lookup 测试返回“未找到 DNS 记录”时,为什么电子邮件会正常发送?

背景: CentOS 8、Postfix、Dovecot、Digital Ocean Droplet。

我的邮件服务器可以毫无问题地发送和接收电子邮件。我的 DNS 记录包括我的邮件服务器的A,AAAAMX记录。

A mail.example.com     directs to 10.10.10.1
AAAA mail.example.com     directs to 1111:1111:1111:1111:1111:1111:1111
MX mail.example.com     mail handled by mail.example.com
Run Code Online (Sandbox Code Playgroud)

但是,当我在MXtoolbox上测试我的设置时,MX Lookup 测试返回了一个错误。

Category: MX        Result: DNS Record not found
Run Code Online (Sandbox Code Playgroud)

问题)哪个记录丢失或配置错误?我不确定在这种情况下要添加或修复什么,尤其是因为可以发送和接收电子邮件。

domain-name-system mx-record

5
推荐指数
1
解决办法
1460
查看次数

使用 LetsEncrypt 和 certBot 如何将邮件服务器添加到现有证书?

主办方:数字海洋

\n\n

操作系统: CentOS

\n\n

我有一个涵盖我的域的现有 SSL 证书。

\n\n

$ certbot certificates产生这个输出。

\n\n
Found the following certs:\n   Certificate Name: example.com\n     Domains: example.com www.example.com\n     Expiry Date: 2020-04-12 21:20:31+00:00 (VALID: 86 days)\n     Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem\n     Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem\n
Run Code Online (Sandbox Code Playgroud)\n\n

我安装了postfix并且我相信我需要将mail.example.com添加到我的证书中。

\n\n

我尝试使用此命令将mail.example.com添加到我的证书中,

\n\n

$ sudo certbot certonly --standalone -d mail.example.com

\n\n

不幸的是它抛出了这个错误,

\n\n
Saving debug log to /var/log/letsencrypt/letsencrypt.log\nPlugins selected: Authenticator standalone, Installer None\nStarting new HTTPS connection (1): acme-v02.api.letsencrypt.org\nObtaining a new certificate\nPerforming the following …
Run Code Online (Sandbox Code Playgroud)

email-server postfix ssl-certificate

3
推荐指数
1
解决办法
8112
查看次数

如何配置 Systemd 服务单元以使用“npm start”而不是“app.js”启动 Node 应用程序

环境: CentOS 8、Node.js、Digital Ocean Droplet

我的 Systemd 设置使用以下命令启动节点应用程序。它按预期工作。

$ sudo systemctl start myapp
Run Code Online (Sandbox Code Playgroud)

文件 1: /etc/systemd/system/myapp.service

[Unit]
Description = My App 
After = network.target

[Service]
ExecStart = /root/start-myapp.sh
Restart=on-failure

[Install]
WantedBy = multi-user.target
Run Code Online (Sandbox Code Playgroud)

文件2: /root/start-myapp.sh

#!/bin/sh
/usr/bin/node /srv/myapp/app.js
Run Code Online (Sandbox Code Playgroud)

但是,当我不使用 Systemd 时,我通常会使用命令npm start. 我宁愿让 Systemd 单元也用npm start.

不幸的是扔了一个错误,当我换app.jsnpm start/root/start-myapp.sh

/usr/bin/node /srv/myapp/npm start
Run Code Online (Sandbox Code Playgroud)

我通过从切换路径作了一次尝试nodenpm,但它产生的同样的错误。

/usr/bin/npm /srv/myapp/npm start
Run Code Online (Sandbox Code Playgroud)

问题:如何让我的 Systemd 单元文件使用命令启动我的应用程序npm start

linux node.js systemd npm

0
推荐指数
1
解决办法
5340
查看次数