AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-321000

João Pimentel Ferreira's questions

Martin Hope
João Pimentel Ferreira
Asked: 2021-08-20 03:04:10 +0800 CST

我可以拥有相同主机名的 A 记录和 MX 记录吗?

  • 0

同一主机名可以有一条 A 记录和一条 MX 记录吗?

例如

example.com  A   192.0.2.42
example.com  MX  mail.anothersite.example.

语境

我正在尝试通过mail.*托管在192.0.2.42

典型 gmail 电子邮件转发配置示例: 在此处输入图像描述

domain-name-system mx-record
  • 1 个回答
  • 257 Views
Martin Hope
João Pimentel Ferreira
Asked: 2020-08-15 08:24:53 +0800 CST

SSLEngine 开启时 Apache 无法启动

  • 3

我的 SSL 虚拟主机就这么简单:

LoadModule ssl_module modules/mod_ssl.so

Listen 443
<VirtualHost *:443>
        DocumentRoot "/srv/www/test"
        ServerName <my_website_domain>

        SSLEngine on
        SSLCertificateFile    /etc/ssl/certs/apache-selfsigned.crt
        SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
</VirtualHost>

当我尝试重新启动 apache 时,apache2ctl configtest && systemctl restart apache2我得到:

apache2.service 的语法 OK
作业失败,因为控制进程以错误代码退出。有关详细信息,请参阅“systemctl status apache2.service”和“journalctl -xe”。

但是当我用 apache 关闭 SSLEngine 时,它SSLEngine off​​可以正常启动并且正常。

当我systemctl status apache2从 开始后运行时SSLEngine on,我得到:

Syntax OK
● apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2020-08-14 18:06:55 CEST; 1min 9s ago
  Process: 22352 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=0/SUCCESS)
  Process: 19851 ExecReload=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful (code=exited, status=0/SUCCESS)
  Process: 22346 ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 22346 (code=exited, status=1/FAILURE)

Aug 14 18:06:55 luu056d start_apache2[22352]: [Fri Aug 14 18:06:55.351148 2020] [so:warn] [pid 22352] AH01574: module authn_core_module is already loaded, skipping
Aug 14 18:06:55 luu056d start_apache2[22352]: [Fri Aug 14 18:06:55.351163 2020] [so:warn] [pid 22352] AH01574: module authz_core_module is already loaded, skipping
Aug 14 18:06:55 luu056d start_apache2[22352]: [Fri Aug 14 18:06:55.351170 2020] [so:warn] [pid 22352] AH01574: module php5_module is already loaded, skipping
Aug 14 18:06:55 luu056d start_apache2[22352]: [Fri Aug 14 18:06:55.351179 2020] [so:warn] [pid 22352] AH01574: module ssl_module is already loaded, skipping
Aug 14 18:06:55 luu056d start_apache2[22352]: [Fri Aug 14 18:06:55.352998 2020] [so:warn] [pid 22352] AH01574: module ssl_module is already loaded, skipping
Aug 14 18:06:55 luu056d start_apache2[22352]: [Fri Aug 14 18:06:55.356261 2020] [core:warn] [pid 22352] AH00117: Ignoring deprecated use of DefaultType in line 143 of /etc/apa.../httpd.conf.
Aug 14 18:06:55 luu056d start_apache2[22352]: httpd (no pid file) not running
Aug 14 18:06:55 luu056d systemd[1]: Failed to start The Apache Webserver.
Aug 14 18:06:55 luu056d systemd[1]: apache2.service: Unit entered failed state.
Aug 14 18:06:55 luu056d systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.

为什么我httpd (no pid file) not running开机时会出现这个错误SSLEngine?
没有任何东西阻塞端口 443,因为当我运行时lsof -i :443结果为空。

我正在为 Linux/SUSE 使用 Apache/2.4.23

apache-2.4
  • 2 个回答
  • 4129 Views
Martin Hope
João Pimentel Ferreira
Asked: 2019-07-17 23:58:52 +0800 CST

在 nginx 中,我在哪个变量中获取主域

  • 2

我想将任何方案中的所有这些子域转发到 https 中的相应主域。我不想有几个服务器指令。

server {
    server_name *.autocosts.info
                *.autocouts.info
                *.autocostos.info
                *.autocosti.info
                *.autocustos.info
                *.autocosturi.info
                *.autokoszty.info;

    listen 80;
    listen 404;
    listen 443 ssl;

    return 301 https://$host$request_uri;
}

这似乎不起作用。是否$host包含子域?我怎样才能得到主域(没有子域)?

我知道我可以使用主域server_name ~^(www\.)?(?<domain>.+)$;,但它不限于上述域列表。

nginx
  • 1 个回答
  • 1078 Views
Martin Hope
João Pimentel Ferreira
Asked: 2018-03-11 05:20:44 +0800 CST

为mysql远程访问配置nginx

  • -1

我有一个 VPS,我正在尝试远程访问我的 mysql 数据库。

我授予任何 IP 地址的 root 权限

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;

我在my.cnf文件中评论了这一行

#bind-address = 127.0.0.1

我重启了mysql

sudo service mysql restart

但是下一步(所有教程都提到过)涉及iptables从端口 3306 转发请求;iptables我意识到我的VPS甚至没有sudo service iptables status输出iptables: unrecognized service

我可以安装 iptables,但我可以用 nginx 实现同样的效果吗?也就是这个fort forwarding允许远程访问我的mysql数据库?

nginx
  • 1 个回答
  • 1243 Views
Martin Hope
João Pimentel Ferreira
Asked: 2015-11-08 12:53:07 +0800 CST

iptables 正在将 IP 转换为域

  • 9

我想阻止服务器上的一整套 IP:

iptables -A INPUT -s 77.0.0.0/8 -j DROP

虽然当我跑步时

iptables -L

在该记录上,我得到一个奇怪的域而不是 IP

DROP       tcp  --  x4d000000.dyn.telefonica.de/8  anywhere
iptables
  • 2 个回答
  • 953 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve