小编Mar*_*náš的帖子

Nginx 连接上游 Apache:重新协商握手失败

我正在配置将用作反向代理的新 Nginx 服务器。我们有运行 Apache 的旧 Debian 服务器。在这个 apache 服务器上,只有 HTTPS 访问的站点我想隐藏在代理后面。

从代理到上游 Apache 的连接必须通过 HTTPS(服务器位于不同的位置,Apache 只允许 HTTPS 访问)。

我的问题是从 Nginx 到 Apache 的连接失败。从浏览器到上游通过 HTTPS 的正常连接没有问题。从同一代理到 Nginx 上游的连接有效。当 Nginx 尝试连接到上游 Apache 连接失败并重新协商握手失败时

来自代理 Nginx 的日志(调试级别)仅表示:

2016/04/07 15:51:08 [error] 5855#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 94.113.97.9, server: procrastination.com, request: "GET / HTTP/1.1", upstream: "https://77.240.191.234:443/", host: "procrastination.com"
Run Code Online (Sandbox Code Playgroud)

从上游 Apache 登录:

[Thu Apr 07 15:36:48 2016] [info] Initial (No.1) HTTPS request received for child 35 (server …
Run Code Online (Sandbox Code Playgroud)

nginx proxy https apache-2.2

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

使用 NOPASSWD 时 sudo 仍然要求输入密码

我想运行这个脚本(它是 git 存储库的 post-receive 钩子):

#!/bin/sh
echo "Executing post-receive hook as user `id` using `which sudo`"
sudo -l
sudo -n bash /var/project/autotest/autotest.sh
Run Code Online (Sandbox Code Playgroud)

它应该在不要求密码的情况下运行,但我得到了以下输出:

Executing post-receive hook as user uid=1005(martinjonas) gid=1001(martinjonas)
groups=1001(martinjonas),1009(lifeweb),1017(project) using /usr/bin/sudo
Matching Defaults entries for martinjonas on this host:
    env_reset

User martinjonas may run the following commands on this host:
    (root) NOPASSWD: /var/project/autotest/autotest.sh
sudo: sorry, a password is required to run sudo
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,根据 sudo -l 的输出,我应该可以在没有密码的情况下运行 /var/project/autotest/autotest.sh,但是 sudo 仍然要求输入密码。

这是我的 sudoers 文件(它是整个文件,没有其他条目):

# /etc/sudoers
#
# This file …
Run Code Online (Sandbox Code Playgroud)

sudo

2
推荐指数
1
解决办法
8169
查看次数

LVM:逻辑卷映射大小远大于文件系统使用的磁盘空间

在 Proxmox 中,我们使用 LVM 为 VM 创建磁盘(逻辑卷)(LVM 精简配置)。

最近我们发现我们的卷组几乎已满,即使所有虚拟机磁盘几乎都是空的。

问题是,某些 LVM 分区显示的映射大小比 df 报告的 VM 磁盘上存储的数据的实际大小大得多。

例如,我们有具有 100 GB 逻辑卷的 VM。VM 内的磁盘使用情况显示仅使用了 3.2 GB 空间:

#> df
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/pve-vm--3011--disk--1   99G  3.2G   91G   4% /
...
Run Code Online (Sandbox Code Playgroud)

但主机上的逻辑卷显示它使用 39.8 GB:

  #> lvdisplay
  --- Logical volume ---
  LV Path                /dev/pve/vm-3011-disk-1
  LV Name                vm-3011-disk-1
  VG Name                pve
  LV UUID                oleKd5-O2o4-c4CE-5vzn-bXRC-TXwF-lzApmW
  LV Write Access        read/write
  LV Creation host, time carol, 2016-08-16 09:03:54 +0200
  LV Pool name           vm-hdd
  LV Status …
Run Code Online (Sandbox Code Playgroud)

filesystems lvm thin-provisioning proxmox

2
推荐指数
1
解决办法
8263
查看次数

尽管 SPF 失败,但 mx.google.com 仍发送垃圾邮件

一些垃圾邮件发送者使用我们的电子邮件地址作为伪造电子邮件的发件人。现在,我们从不再存在的电子邮件中收到了数以千计的退回邮件。

我们设置了 SPF 和 DKIM 记录,但它并没有停止。

procrastination.com TXT v=DMARC1;p=reject;sp=reject;pct=100;aspf=r;fo=0;ri=86400;rua=mailto:info@procrastination.com    IN  3600

procrastination.com TXT v=spf1 ip4:77.240.191.234 ip4:83.167.254.20 ip4:83.167.254.21 ip4:83.167.254.22 ip4:81.95.97.117 ip4:81.95.97.100 a -all
Run Code Online (Sandbox Code Playgroud)

表单邮件标头看起来像垃圾邮件发送者在他的电子邮件中使用 Google SMTP mx.google.com,尽管他们的 SPF 结果是失败的。

示例标题如下:

    Delivery to the following recipient failed permanently:

     r.fiores@webmail.flcgil.it

Technical details of permanent failure: 
Google tried to deliver your message, but it was rejected by the server for the recipient domain webmail.flcgil.it by webmail.flcgil.it. [109.168.127.232].

The error that the other server returned was:
550 5.1.1 <r.fiores@webmail.flcgil.it>: Recipient address rejected: User unknown in …
Run Code Online (Sandbox Code Playgroud)

email spam spf dkim email-bounces

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