同一主机名可以有一条 A 记录和一条 MX 记录吗?
例如
example.com A 192.0.2.42
example.com MX mail.anothersite.example.
语境
我正在尝试通过mail.*
托管在192.0.2.42
我的 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
我想将任何方案中的所有这些子域转发到 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>.+)$;
,但它不限于上述域列表。
我有一个 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数据库?
我想阻止服务器上的一整套 IP:
iptables -A INPUT -s 77.0.0.0/8 -j DROP
虽然当我跑步时
iptables -L
在该记录上,我得到一个奇怪的域而不是 IP
DROP tcp -- x4d000000.dyn.telefonica.de/8 anywhere