我正在使用 A DNS 记录为 IPV4 流量转换 WWW。它看起来像这样:
DNS记录
类型:A
主机名:www.mywebsite.example
值:指向192.168.0.1
我是否需要为 WWW 添加 AAAA 记录以支持 IPv6 流量?
背景: CentOS 8、Postfix、Dovecot、Digital Ocean Droplet。
我的邮件服务器可以毫无问题地发送和接收电子邮件。我的 DNS 记录包括我的邮件服务器的A
,AAAA
和MX
记录。
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)
问题)哪个记录丢失或配置错误?我不确定在这种情况下要添加或修复什么,尤其是因为可以发送和接收电子邮件。
主办方:数字海洋
\n\n操作系统: CentOS
\n\n我有一个涵盖我的域的现有 SSL 证书。
\n\n$ certbot certificates
产生这个输出。
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添加到我的证书中。
我尝试使用此命令将mail.example.com添加到我的证书中,
\n\n$ sudo certbot certonly --standalone -d mail.example.com
不幸的是它抛出了这个错误,
\n\nSaving 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) 环境: 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.js
到npm start
的/root/start-myapp.sh
,
/usr/bin/node /srv/myapp/npm start
Run Code Online (Sandbox Code Playgroud)
我通过从切换路径作了一次尝试node
来npm
,但它产生的同样的错误。
/usr/bin/npm /srv/myapp/npm start
Run Code Online (Sandbox Code Playgroud)
问题:如何让我的 Systemd 单元文件使用命令启动我的应用程序npm start
?