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-299976

Andrew Newby's questions

Martin Hope
Andrew Newby
Asked: 2023-09-18 18:02:34 +0800 CST

设置 monit 来跟踪 php-fmp 站点的 .sock 文件

  • 7

我正在尝试设置 Monit,以便它可以跟踪域,以防 PHP 崩溃。例子:

check file php7.3-fpm-pidfile with path /var/run/php/php7.3-fpm.pid
    start program = "/usr/sbin/service php7.3-fpm start" with timeout 60 seconds
    stop program  = "/usr/sbin/service php7.3-fpm stop"
    if does not exist then restart
    if failed unixsocket /run/php/php7.3-fpm-domain.co.uk.sock then restart
    if failed unixsocket /run/php/php7.3-fpm-domain2.co.uk.sock then restart
    if failed unixsocket /run/php/php7.3-fpm-domain3.co.uk.sock then restart

作为一个简单的测试:

check file php7.3-fpm-pidfile with path /var/run/php/php7.3-fpm.pid
    start program = "/usr/sbin/service php7.3-fpm start" with timeout 60 seconds
    stop program  = "/usr/sbin/service php7.3-fpm stop"
    if does not exist then restart
    if failed unixsocket /run/php/php7.3-fpm-domain.co.uk.sock then restart

然而,重新启动 Monit 时,最终失败:

/etc/monit/conf-enabled/php-fpm:14: 语法错误 'unixsocket'

我使用的是Monit 5.31.0,它应该足够新才能有这个unixsocket选项。我缺少什么?

php-fpm
  • 1 个回答
  • 24 Views
Martin Hope
Andrew Newby
Asked: 2022-12-17 01:22:34 +0800 CST

Dovecot 的 fts_solr - 找不到插件文件?

  • 6

我正在尝试按照此操作通过我的 Dovecot 安装获取 Solr 搜索设置:

https://doc.dovecot.org/configuration_manual/fts/solr/#fts-backend-solr

一切似乎都很好——我可以在 Solr 管理中看到核心。我正在使用 Solr 8.9.0,但它似乎对配置文件很满意。

但是,它说运行以实际索引的命令之一:

doveadm fts rescan -u foo@bar.com 

我得到:

Fatal: Plugin 'fts_solr' not found from directory /usr/lib/dovecot/modules

果然,我在任何东西中都看不到那个名字的任何东西:

root@east:/usr/lib/dovecot/modules# ls -lh *fts*
-rw-r--r-- 1 root root 263K Jul  7 17:17 lib20_fts_plugin.so
-rw-r--r-- 1 root root  71K Jul  7 17:17 lib21_fts_squat_plugin.so

我错过了什么?我是否也需要手动安装插件?

dovecot --version
2.3.7.2 (3c910f64b)

更新:环顾四周,我可以看到 dovecot-fts-solr 插件(https://alpine.pkgs.org/3.15/alpine-main-aarch64/dovecot-fts-solr-2.3.17.1-r0.apk.html) . 我似乎无法安装它。不太确定如何进行?(我可以直接下载 .so 文件并将其放入 /usr/lib/dovecot/modules ,但我很确定那行不通:))

更新 2:所以我设法找到了:

apt-get 安装 dovecot-solr

这将创建 lib21_fts_solr_plugin.so 文件。但是,当我尝试重新索引消息时,我什么也没得到:

doveadm -D fts rescan -u hello@hatlamp.com
Debug: Loading modules from directory: /usr/lib/dovecot/modules
Debug: Module loaded: /usr/lib/dovecot/modules/lib20_fts_plugin.so
Debug: Module loaded: /usr/lib/dovecot/modules/lib21_fts_solr_plugin.so
Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm
Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_lucene_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so: undefined symbol: lucene_index_iter_deinit (this is usually intentional, so just ignore this message)
Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so
Debug: Skipping module doveadm_mail_crypt_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/libdoveadm_mail_crypt_plugin.so: undefined symbol: mail_crypt_box_get_pvt_digests (this is usually intentional, so just ignore this message)
doveadm(hello@hatlamp.com)<35131><>: Debug: auth-master: userdb lookup(hello@hatlamp.com): Started userdb lookup
doveadm(hello@hatlamp.com)<35131><>: Debug: auth-master: conn unix:/var/run/dovecot//auth-userdb: Connecting
doveadm(hello@hatlamp.com)<35131><>: Debug: auth-master: conn unix:/var/run/dovecot//auth-userdb: Client connected (fd=10)
doveadm(hello@hatlamp.com)<35131><>: Debug: auth-master: userdb lookup(hello@hatlamp.com): auth USER input: hello@hatlamp.com uid=1011 gid=8 home=/home/hatlamp quota_rule=*:storage=0M
doveadm(hello@hatlamp.com)<35131><>: Debug: auth-master: userdb lookup(hello@hatlamp.com): Finished userdb lookup (username=hello@hatlamp.com uid=1011 gid=8 home=/home/hatlamp quota_rule=*:storage=0M)
doveadm(hello@hatlamp.com)<35131><>: Debug: Added userdb setting: plugin/quota_rule=*:storage=0M
doveadm(hello@hatlamp.com): Debug: Effective uid=1011, gid=8, home=/home/hatlamp
doveadm(hello@hatlamp.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/hatlamp/mail/hatlamp.com/hello
doveadm(hello@hatlamp.com): Debug: maildir++: root=/home/hatlamp/mail/hatlamp.com/hello, index=, indexpvt=, control=, inbox=/home/hatlamp/mail/hatlamp.com/hello, alt=
doveadm(hello@hatlamp.com): Debug: auth-master: conn unix:/var/run/dovecot//auth-userdb: Disconnected: Connection closed (fd=10)

查看solr的界面,没有文章:

在此处输入图像描述

dovecot
  • 1 个回答
  • 22 Views
Martin Hope
Andrew Newby
Asked: 2021-09-05 07:04:55 +0800 CST

在 Ubuntu 18.04 中空间不足(并删除一些文件)后无法恢复磁盘空间

  • 0

这真让我抓狂!我的服务器空间不足。我通过删除文件夹清理了一些文件。可用空间量没有增加(% 明智)。这是我现在看到的:

在此处输入图像描述

如您所见,它显示 315gb 大小,其中 298gb 正在使用中。那么为什么它显示 100% 已使用?我有 1.1gb 免费的唯一原因,你可以看到是否由于删除更多文件而重新启动。即使我之前删除了 15+gb 的文件:/

我已经尝试了很多东西,例如lsof +L1:

    COMMAND    PID      USER   FD   TYPE DEVICE SIZE/OFF NLINK  NODE NAME
php-fpm7.  726      root    3u   REG    8,0        0     0   605 /tmp/.ZendSem.sRUIJj (deleted)
mysqld     863     mysql    5u   REG    8,0        0     0  2938 /tmp/ibj2MjTy (deleted)
mysqld     863     mysql    6u   REG    8,0        0     0 10445 /tmp/ibgsRaLu (deleted)
mysqld     863     mysql    7u   REG    8,0        0     0 76744 /tmp/ibx2g3Cq (deleted)
mysqld     863     mysql    8u   REG    8,0        0     0 76750 /tmp/ib7D93oi (deleted)
mysqld     863     mysql   12u   REG    8,0        0     0 77541 /tmp/ibSr0xre (deleted)
dovecot   1278      root  139u   REG   0,23        0     0  2021 /run/dovecot/login-master-notify6ae65d15ebbecfbf (deleted)
dovecot   1278      root  172u   REG   0,23        0     0  2022 /run/dovecot/login-master-notify4b18cb63ddb75aab (deleted)
dovecot   1278      root  177u   REG   0,23        0     0  2023 /run/dovecot/login-master-notify05ff81e3cea47ffa (deleted)
cron      2239      root    5u   REG    8,0        0     0  1697 /tmp/#1697 (deleted)
cron      2240      root    5u   REG    8,0        0     0 77563 /tmp/#77563 (deleted)
sh        2243      root   10u   REG    8,0        0     0  1697 /tmp/#1697 (deleted)
sh        2243      root   11u   REG    8,0        0     0  1697 /tmp/#1697 (deleted)
sh        2244      root   10u   REG    8,0        0     0 77563 /tmp/#77563 (deleted)
sh        2244      root   11u   REG    8,0        0     0 77563 /tmp/#77563 (deleted)
imap-logi 2512  dovenull    4u   REG   0,23        0     0  2023 /run/dovecot/login-master-notify05ff81e3cea47ffa (deleted)
imap-logi 3873  dovenull    4u   REG   0,23        0     0  2023 /run/dovecot/login-master-notify05ff81e3cea47ffa (deleted)
pop3-logi 3915  dovenull    4u   REG   0,23        0     0  2021 /run/dovecot/login-master-notify6ae65d15ebbecfbf (deleted)
pop3-logi 3917  dovenull    4u   REG   0,23        0     0  2021 /run/dovecot/login-master-notify6ae65d15ebbecfbf (deleted)
php-fpm7. 4218    fndesk    3u   REG    8,0        0     0   605 /tmp/.ZendSem.sRUIJj (deleted)
php-fpm7. 4268 executive    3u   REG    8,0        0     0   605 /tmp/.ZendSem.sRUIJj (deleted)

但我在那里看不到任何锁定文件的东西

ubuntu-18.04 df
  • 1 个回答
  • 180 Views
Martin Hope
Andrew Newby
Asked: 2021-07-07 07:24:25 +0800 CST

nginx 在 ipv6 上侦听,但由于某种原因网站无法加载

  • 2

我正在尝试让 ipv6 在 nginx (nginx/1.19.6) 上为 SSL 工作。在我的域配置中,我有:

server {
    listen      93.93.135.169:443 http2;
    listen      [::]:443 http2;
    server_name backups.myserver.com;
   ....
}

..然后是标准端口;

server {
    listen      93.93.135.169:80;
    listen      [::]:80;
    server_name backups.myserver.com ;
    ...
}

Netstat 显示 nginx 正在侦听端口 443 和 80:

 netstat -tulpn | grep nginx
tcp        0      0 93.93.135.169:80        0.0.0.0:*               LISTEN      1168/nginx: master
tcp        0      0 127.0.0.1:8084          0.0.0.0:*               LISTEN      1168/nginx: master
tcp        0      0 93.93.135.169:443       0.0.0.0:*               LISTEN      1168/nginx: master
tcp        0      0 0.0.0.0:9183            0.0.0.0:*               LISTEN      5247/nginx: master
tcp6       0      0 :::80                   :::*                    LISTEN      1168/nginx: master
tcp6       0      0 :::443                  :::*                    LISTEN      1168/nginx: master

我可以在 ipv4 和 ipv6 上找到服务器:

root@admin3:~# ping -4 backups.myserver.com
PING backups.myserver.com (93.93.135.169) 56(84) bytes of data.
64 bytes from backups.myserver.com (93.93.135.169): icmp_seq=1 ttl=60 time=1.58 ms
^X^C
--- backups.myserver.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.575/1.575/1.575/0.000 ms
root@admin3:~# ping -6 backups.myserver.com
PING backups.myserver.com(2a00:1098:80:a0::1 (2a00:1098:80:a0::1)) 56 data bytes
64 bytes from 2a00:1098:80:a0::1 (2a00:1098:80:a0::1): icmp_seq=1 ttl=61 time=1.55 ms
^X64 bytes from 2a00:1098:80:a0::1 (2a00:1098:80:a0::1): icmp_seq=2 ttl=61 time=1.74 ms

在iptables上,我得到:

iptables --list -n | grep 443
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443

iptables --list -n | grep 80
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 80,443

..和ip6tables:

ip6tables --list -n | grep 80
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:80

ip6tables --list -n | grep 443
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:443

然而,当我在https://ipv6-test.com/上使用http测试该站点时,它可以工作:

在此处输入图像描述

但是一旦我尝试 SSL,我就会得到:

在此处输入图像描述

从另一台服务器运行 curl 测试,我得到:

curl -v -6 https://backups.myserver.com
*   Trying 2a00:1098:80:a0::1:443...
* TCP_NODELAY set
* Connected to backups.myserver.com (2a00:1098:80:a0::1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* error:1408F10B:SSL routines:ssl3_get_record:wrong version number
* Closing connection 0
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

我已经没有其他东西可以尝试了。有什么建议么?

nginx ipv6
  • 1 个回答
  • 216 Views
Martin Hope
Andrew Newby
Asked: 2021-02-23 23:55:32 +0800 CST

ipv6 和 iptables - 设置基本规则

  • 0

我开始意识到我的 IPv6 端口没有通过 iptables,因此可以被攻击访问。我还没有看到,但我相信这只是时间问题。因此,我正在尝试支持 ipv6 的防火墙。我遇到了这个配置ip6tables规则的脚本:

#!/bin/bash

# ip6tables single-host firewall script

# Define your command variables
ipt6="/sbin/ip6tables"

# Flush all rules and delete all chains
# for a clean startup
$ipt6 -F
$ipt6 -X

# Zero out all counters
$ipt6 -Z

# Default policies: deny all incoming
# Unrestricted outgoing

$ipt6 -P INPUT DROP
$ipt6 -P FORWARD DROP
$ipt6 -P OUTPUT ACCEPT

# Must allow loopback interface
$ipt6 -A INPUT -i lo -j ACCEPT

# Reject connection attempts not initiated from the host
$ipt6 -A INPUT -p tcp --syn -j DROP

# Allow return connections initiated from the host
$ipt6 -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

# Accept all ICMP v6 packets
$ipt6 -A INPUT -p ipv6-icmp -j ACCEPT

# Optional rules to allow other LAN hosts access to services. Delete $ipt6 -A INPUT -p tcp --syn -j DROP

# Allow DHCPv6 from LAN only
$ipt6 -A INPUT -m state --state NEW -m udp -p udp -s fe80::/10 --dport 546 -j ACCEPT

# Allow connections from SSH clients
$ipt6 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

# Allow HTTP and HTTPS traffic 
$ipt6 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
$ipt6 -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

# Allow access to SMTP, POP3, and IMAP
$ipt6 -A INPUT -m state --state NEW -p tcp -m multiport --dport 25,110,143 -j ACCEPT

虽然这确实阻止了我想要的,但它似乎也不允许 80 和 443 端口?

$ipt6 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
$ipt6 -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

当我尝试从另一台服务器访问时,它只是挂起:

curl -v -6 http://backups.foo.org:80
* Rebuilt URL to: http://backups.foo.org:80/
*   Trying 2a00:1098:80:a1::1...
* TCP_NODELAY set

ipv4 工作正常:

curl -v -4 http://backups.foo.org:80
* Rebuilt URL to: http://backups.foo.org:80/
*   Trying 93.93.135.111...
* TCP_NODELAY set
* Connected to backups.foo.org (93.93.135.169) port 80 (#0)
> GET / HTTP/1.1
> Host: backups.foo.org
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Tue, 23 Feb 2021 07:52:32 GMT
< Content-Type: text/html
< Content-Length: 162
< Connection: keep-alive
< Location: https://backups.foo.org/
<
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host backups.foo.org left intact

我错过了什么?基本上,我只想阻止敏感服务(MySQL、Exim、SMTP 等)上的 ipv6 端口。

更新:按照建议,我已删除:

$ipt6 -A INPUT -p tcp --syn -j DROP

然后再次运行脚本,ip6tables现在看起来像这样:

root@backups:~# ip6tables --list -n
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all      ::/0                 ::/0
ACCEPT     all      ::/0                 ::/0                 ctstate RELATED,ESTABLISHED
ACCEPT     icmpv6    ::/0                 ::/0
ACCEPT     udp      fe80::/10            ::/0                 state NEW udp dpt:546
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:22
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:80
ACCEPT     tcp      ::/0                 ::/0                 state NEW tcp dpt:443
ACCEPT     tcp      ::/0                 ::/0                 state NEW multiport dports 25,110,143

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

我已经测试过了:

curl -6 backups.foo.org
curl: (7) Failed to connect to backups.foo.org port 80: Connection refused

同样,它适用于-4. 奇怪的是它确实从这里开始工作:

https://tools.keycdn.com/ipv6-ping

我可以从同一台服务器 ping,它工作正常:

ping backups.foo.org
PING backups.chambresdhotes.org(2a00:1098:80:a1::1 (2a00:1098:80:a1::1)) 56 data bytes
64 bytes from 2a00:1098:80:a1::1 (2a00:1098:80:a1::1): icmp_seq=1 ttl=59 time=1.08 ms
64 bytes from 2a00:1098:80:a1::1 (2a00:1098:80:a1::1): icmp_seq=2 ttl=59 time=1.03 ms
^X^C

根据要求,ip6tables-save还有以下输出:

 ip6tables-save
# Generated by ip6tables-save v1.6.1 on Tue Feb 23 08:57:59 2021
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [78:6090]
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -s fe80::/10 -p udp -m state --state NEW -m udp --dport 546 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m multiport --dports 25,110,143 -j ACCEPT
COMMIT

更新 2:

根据要求,来自 ss -lnpt. 有趣的是,我在那里看不到端口 80。

LISTEN    0    100  [::]:993       [::]:*  
LISTEN    0    100  [::]:995       [::]:*  
LISTEN    0    128  [::]:22122       [::]:*  
LISTEN    0    100  [::]:110       [::]:*  
LISTEN    0    128 ::1]:783       [::]:*   
LISTEN    0    100  [::]:143       [::]:*  
LISTEN    0    128  [::]:55413       [::]:*  
LISTEN    0    128 *:8181         *:*      
LISTEN    0    128 ::1]:53       [::]:*
LISTEN    0    128  [::]:55414   [::]:*
LISTEN    0    128  [::]:22      [::]:*
LISTEN    0    128 [::1]:8953    [::]:*  

有趣的是,它显示为netstat:

sudo netstat -tulpan | grep nginx
tcp        0      0 0.0.0.0:9183            0.0.0.0:*               LISTEN      1133/nginx: master
tcp        0      0 93.93.135.169:80        0.0.0.0:*               LISTEN      1161/nginx: master
tcp        0      0 127.0.0.1:8084          0.0.0.0:*               LISTEN      1161/nginx: master
tcp        0      0 93.93.135.169:443       0.0.0.0:*               LISTEN      1161/nginx: master
tcp6       0      0 :::80                   :::*                    LISTEN      1161/nginx: master
tcp6       0      0 :::443                  :::*                    LISTEN      1161/nginx: master
udp        0      0 127.0.0.1:51104         127.0.0.53:53           ESTABLISHED 1135/nginx: worker
ipv6 ip6tables
  • 1 个回答
  • 780 Views
Martin Hope
Andrew Newby
Asked: 2020-09-20 00:04:45 +0800 CST

如何为具有良好读/写速度的较小文件创建磁盘?

  • 2

我正在尝试找到在卷上存储大量小文件的最佳方法,而不会达到 inode 限制。我创建了一个新驱动器:

sudo mkfs.ext4 -N 100000000 /dev/device

这正确显示:

/dev/device  100040704 13929894 86110810   14% /mnt/websites2

但是,它似乎对该驱动器的读/写速度产生了相当大的影响。我正在做一些研究,并遇到:

https://www.tecmint.com/increase-disk-inode-number-in-linux/

他们建议:

sudo mkfs.ext4 -T largefile /dev/device

“小文件”的选项是什么?我似乎找不到任何关于-Tcan 值的文档?另外 - 关于如何为大量小文件(每个约 3-10kb)配置驱动器的任何其他建议,将不胜感激!

inode mkfs
  • 1 个回答
  • 424 Views
Martin Hope
Andrew Newby
Asked: 2020-08-13 22:02:54 +0800 CST

无法理解已发送电子邮件的 SPF

  • 1

我正在努力解决这个问题。我的电子邮件被发送到垃圾邮件中。在这种情况下,它的 gmail。如果我查看电子邮件详细信息,我会得到:

在此处输入图像描述

109.74.201.130 是另一台服务器,托管着 ultranerds.co.uk。这是我对域clickpress.com的 SPF 记录:

在此处输入图像描述

...这是我发送的电子邮件详细信息:

From: editor@clickpress.com
Subject: Your ClickPress news release has been approved
To: andy@ultranerds.co.uk

那么到底为什么它会尝试查找 ultranerds.co.uk 的 IP,并对其进行 SPF 检查呢?我认为 SPF 的全部意义在于它查找发件人信息,而不是收件人?(我以前从未见过这种行为)

email-server spf
  • 1 个回答
  • 80 Views
Martin Hope
Andrew Newby
Asked: 2020-03-28 07:51:35 +0800 CST

Python 3.7 似乎不想安装(仍然显示 2.7.17?)

  • 1

我正在尝试在我的 Ubuntu 18.04 服务器上安装Python 3.7 。遵循这些指示:

https://phoenixnap.com/kb/how-to-install-python-3-ubuntu

sudo apt update
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.7

但在那之后,如果我这样做:

root@west:~# python --version
Python 2.7.17

我究竟做错了什么?如果我尝试再次安装它,它会告诉我它已经安装了?

root@west:~# sudo apt install python3.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.7 is already the newest version (3.7.7-1+bionic1).
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
python ubuntu-18.04
  • 1 个回答
  • 1285 Views
Martin Hope
Andrew Newby
Asked: 2019-11-05 00:42:09 +0800 CST

如何将其他 IP 与 Google Apps SPF 一起添加到 SPF 记录

  • 0

我目前的 SPF 记录如下:

v=spf1 include:_spf.google.com ~all

我正在尝试在此记录中添加一些额外的 IP(对于我们的运输系统,从我们的域通过电子邮件发送)。问题是目前它们被标记为带有“软失败”的垃圾邮件(由于 IP 与 Google 的不匹配)。我发现这篇关于在记录中添加多个 IP 的帖子:

https://www.digitalocean.com/community/questions/add-two-ip-addresses-to-an-spf-record

但是,我不确定如何编辑上面的 SPD 记录来实现这一点。是不是就这么简单:

v=spf1 +a +mx ip4:167.XX.XXX.247 ip4:167.XX.XXX.40  include:_spf.google.com ~all

(我不想做错这件事,因为它会破坏我们当前所有的邮件系统——因此提出这个问题:))

spf
  • 1 个回答
  • 875 Views
Martin Hope
Andrew Newby
Asked: 2019-05-14 08:07:05 +0800 CST

nginx映射规则,不区分大小写

  • 4

我正在尝试强制 URL 指向新位置。例如:

  • site.com/Gites/
  • site.com/gites/

我目前在网站上设置了“地图”:

map $uri $is_rewrite {
    default     no_redirect;
    include /home/xxx/conf/web/chambres.com.extra/links.map;
}

...在该文件中,规则之一是:

/gites/ https://$http_host;
#/Gites/ https://$http_host;
/french/Gites/ https://$http_host;

如果我取消注释第二行,我会收到错误消息!

nginx:[emerg] 冲突参数“/gites/”在 /home/xxx/conf/web/chambres.com.extra/links.map:107

当我测试它时,果然,小写的有效,但大写的“Gites”无效。我怎样才能使它不区分大小写?

nginx
  • 1 个回答
  • 4416 Views
Martin Hope
Andrew Newby
Asked: 2019-03-20 02:05:47 +0800 CST

mod_perl 似乎正在跨用户帐户共享模块

  • 1

请询问您是否需要更多信息。我只是想弄清楚发生了什么。所以我有一个以nginx为前端的服务器,然后传递给 Apache (2.4.18)。在我的域的 Apache 配置文件中,我有:

<VirtualHost *:8181>

    CustomLog /home/steampunkcom/web/uk.site.com/logs/uk.site.com.apache.log combined
    ErrorLog /home/steampunkcom/web/uk.site.com/logs/uk.site.com.apache.error.log

    LogLevel error

    RemoteIPHeader X-Forwarded-For

    # MOD_PERL
    LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so

    ServerName uk.site.com
    ServerAlias www.uk.site.com
    ServerAdmin info@uk.site.com
    DocumentRoot /home/steampunkcom/web/uk.site.com/public_html

    # MOD_PERL
    PerlRequire  /home/steampunkcom/web/uk.site.com/startup.pl

    ScriptAlias /cgi-bin/ /home/steampunkcom/web/uk.site.com/public_html/cgi-bin/

    Alias /vstats/ /home/steampunkcom/web/uk.site.com/stats/
    Alias /error/ /home/steampunkcom/web/uk.site.com/document_errors/


    # Uncomment this part to make run as mod_perl - comment out above as well!
    <Directory "/home/steampunkcom/web/uk.site.com/*">

        Options +ExecCGI +FollowSymLinks +MultiViews
        AllowOverride AuthConfig

        PerlResponseHandler ModPerl::Registry
        AddHandler perl-script .cgi .pl
        Options +ExecCGI
        PerlOptions +ParseHeaders
        AllowOverride All
        Require all granted

    </Directory>

    <Directory /home/steampunkcom/web/uk.site.com/stats>
       AllowOverride All
       Require all granted
    </Directory>


    <IfModule mod_ruid2.c>
        RMode config
        RUidGid steampunkcom steampunkcom
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID steampunkcom steampunkcom
    </IfModule>

    IncludeOptional /home/steampunkcom/conf/web/apache2.uk.site.com.conf*

</VirtualHost>

这工作正常。它在 mod_perl 下运行良好。当我尝试在另一个用户帐户上启用 mod_perl 时出现问题:

<VirtualHost *:8181>

    CustomLog /home/willr/web/anothersite.co.uk/logs/anothersite.co.uk.apache.log combined
    ErrorLog /home/willr/web/anothersite.co.uk/logs/anothersite.co.uk.apache.error.log

    LogLevel error

    RemoteIPHeader X-Forwarded-For

    LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so

    PerlRequire  /home/willr/web/anothersite.co.uk/startup.pl

    ServerName anothersite.co.uk
    ServerAlias www.anothersite.co.uk
    ServerAdmin info@anothersite.co.uk
    DocumentRoot /home/willr/web/anothersite.co.uk/public_html


    #####
    ScriptAlias /cgi-bin/ /home/willr/web/anothersite.co.uk/public_html/cgi-bin/
    #####

    Alias /vstats/ /home/willr/web/anothersite.co.uk/stats/
    Alias /error/ /home/willr/web/anothersite.co.uk/document_errors/

    <Directory "/home/willr/web/anothersite.co.uk/*">
        Options +ExecCGI +FollowSymLinks +MultiViews
        AllowOverride AuthConfig

        PerlResponseHandler ModPerl::Registry
        AddHandler perl-script .cgi .pl
        Options +ExecCGI
        PerlOptions +ParseHeaders
        AllowOverride All
        Require all granted

    </Directory>


    <IfModule mod_ruid2.c>
        RMode config
        RUidGid willr willr
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID willr willr
    </IfModule>

</VirtualHost>

起初我以为一切正常,但后来我开始收到人们的电子邮件,告诉我他们无法登录该网站。在查看它时,我发现它正在跨用户帐户共享一个模块。我试图找出原因,以及我能做些什么。我知道 mod_perl 可以跨多个用户帐户运行而无需共享模块(正如我在为我管理的其他服务器上所做的那样),但我不确定它如何/为什么在这里这样做。

任何想法都非常感谢!与此同时,我不得不为其中一个站点禁用 mod_perl,因为它给另一个站点造成了太多问题:(

我刚刚发现了一些关于使用+Parent和PerlSwitches配置的信息:

 <VirtualHost ...>
      ServerName dev1
      PerlOptions +Parent
      PerlSwitches -I/home/dev1/lib/perl
  </VirtualHost>

https://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_

但问题是它似乎仍然会导致模块在其他用户帐户之间“共享”。所以我有:

PerlOptions +ParseHeaders +Parent
PerlSwitches -Mlib=/home/steampunkcom/web/foo.co.uk/lib

当我查看@INC 的内容时,我可以看到:

@INC = 
    /home/steampunkcom/web/foo.com/public_html/cgi-bin/admin
    /home/steampunkcom/web/foo.com/lib
    /etc/perl
    /usr/local/lib/x86_64-linux-gnu/perl/5.22.1
    /usr/local/share/perl/5.22.1
    /usr/lib/x86_64-linux-gnu/perl5/5.22
    /usr/share/perl5
    /usr/lib/x86_64-linux-gnu/perl/5.22
    /usr/share/perl/5.22
    /usr/local/lib/site_perl
    .
    /etc/apache2

我真的以为我在那里有解决方案,但也许没有:(

apache-2.4
  • 1 个回答
  • 135 Views
Martin Hope
Andrew Newby
Asked: 2019-02-23 01:32:08 +0800 CST

Apache 2.4.18 为现有文件随机提供 404

  • 2

我试图弄清楚为什么会发生这种情况。我在这台服务器上从来没有遇到过这个问题,所以我有点困惑。

服务器是 nginx + Apache 2.4 反向代理。所以nginx我有这个代理通行证:

    location ~ \.cgi$ {
        try_files $uri =404;
        gzip off;
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_pass http://127.0.0.1:8181;

    }

然后对于 Apache 配置中的域,我有:

<VirtualHost *:8181>

    # other stuff here

    <Directory "/the/web/directory/*">
        Options +ExecCGI +FollowSymLinks +MultiViews
        AllowOverride AuthConfig
        Require all granted
        AddHandler cgi-script .cgi .pl
    </Directory>

</VirtualHost>

域已启用并正常运行。但是,在为某人开发网站时,我遇到了一个奇怪的错误。

页面时不时地给出一个404:

在此处输入图像描述

..但其余时间它工作正常。在这种情况下,我向它发送完全相同的参数(只需重新提交表单)。我已经检查了问题是否与 AJAX 请求有关,但是如果我在选项卡中打开 URL 并按重新加载几次进行测试,我会遇到同样的问题。

Apache 日志文件中没有任何帮助:

authorization result of <RequireAny>: granted, referer: https://x.co.uk/contact.html

我很确定错误来自 Apache 端,因为 404 的响应是:

Not Found

The requested URL /cgi-bin/contact.cgi was not found on this server.
Apache/2.4.18 (Ubuntu) Server at x.co.uk Port 8181

我对这可能是什么感到有点茫然。有任何想法吗?

apache-2.4
  • 1 个回答
  • 828 Views
Martin Hope
Andrew Newby
Asked: 2019-02-19 22:32:51 +0800 CST

在 Ubuntu 16.04 服务器上升级 wget

  • 1

我正在尝试wget在服务器上升级我的副本。目前正在运行:

1.17.1-1ubuntu1.4

问题是我需要1.19,所以我可以获得一个新功能:

http://tomszilagyi.github.io/2017/02/Wget-retry-on-http-error

我的补丁是作为 Wget 版本 1.19.1 发布的更改的一部分,所以现在(如果您运行该版本或更高版本)您可以编写如下内容:

wget --retry-on-http-error=503 ...

我们在尝试向其请求图像时返回 502 错误的网站存在问题。他们的技术人员正在研究它,但与此同时,我需要一种方法来自动重试 502 文件。这似乎符合要求,但我似乎无法升级它。

apt-get update
apt-get install wget

...给出:

Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version (1.17.1-1ubuntu1.4).

我不确定还有什么可以尝试的?

apt
  • 1 个回答
  • 3041 Views
Martin Hope
Andrew Newby
Asked: 2018-12-05 23:46:03 +0800 CST

WWW::Mechanize Perl 模块不会安装在服务器上

  • 2

我试图弄清楚为什么 Perl 模块不会安装在我的服务器上。

cpanm WWW::Mechanize

它处理东西很长时间,然后最终死于:

root@admin:~# cpanm WWW::Mechanize
--> Working on WWW::Mechanize
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/WWW-Mechanize-1.90.tar.gz ... OK
Configuring WWW-Mechanize-1.90 ... OK
Building and testing WWW-Mechanize-1.90 ... FAIL
! Installing WWW::Mechanize failed. See /root/.cpanm/work/1543994046.20570/build.log for details. Retry with --force to force install it.

日志文件中有这样的内容:

t/00-report-prereqs.t .................... ok
t/add_header.t ........................... ok
t/aliases.t .............................. ok
t/area_link.t ............................ ok
t/autocheck.t ............................ ok
t/bad-request.t .......................... ok
t/clone.t ................................ ok
t/content.t .............................. ok
# Test server http://127.0.0.1:31546 as PID 20661
t/cookies.t .............................. ok
t/credentials-api.t ...................... ok
t/credentials.t .......................... ok
t/die.t .................................. ok
t/dump.t ................................. ok
t/field.t ................................ ok
t/find_frame.t ........................... ok
t/find_image.t ........................... ok
t/find_inputs.t .......................... ok
t/find_link-warnings.t ................... ok
t/find_link.t ............................ ok
t/find_link_id.t ......................... ok
t/form-parsing.t ......................... ok
t/form_with_fields.t ..................... ok
t/form_with_fields_passthrough_params.t .. ok
t/frames.t ............................... ok

#   Failed test '... and it was recorded in the history'
#   at t/history.t line 131.
#          got: '3'
#     expected: '2'
# Looks like you failed 1 test of 28.
t/history.t .............................. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/28 subtests 
t/image-new.t ............................ ok
t/image-parse.t .......................... ok
t/link-base.t ............................ ok
t/link-relative.t ........................ ok
t/link.t ................................. ok
t/local/back.t ........................... ok
t/local/click.t .......................... ok
t/local/click_button.t ................... ok
# Running tests against http://127.0.0.1:50871/?xml=1
t/local/content.t ........................ ok
t/local/encoding.t ....................... ok
t/local/failure.t ........................ ok
t/local/follow.t ......................... ok
t/local/form.t ........................... ok
t/local/get.t ............................ ok
t/local/nonascii.t ....................... ok
t/local/overload.t ....................... skipped: Mysteriously stopped passing, and I don't know why.
t/local/page_stack.t ..................... ok
t/local/post.t ........................... ok
t/local/referer.t ........................ ok
t/local/reload.t ......................... ok
t/local/submit.t ......................... ok
t/mech-dump/mech-dump.t .................. ok
t/new.t .................................. ok
t/regex-error.t .......................... ok
t/save_content.t ......................... ok
t/select.t ............................... ok
t/taint.t ................................ skipped: Test::Taint required for checking taintedness
t/tick.t ................................. ok
t/untaint.t .............................. ok
t/upload.t ............................... ok
t/uri.t .................................. ok
t/warn.t ................................. ok
t/warnings.t ............................. ok

Test Summary Report
-------------------
t/history.t                            (Wstat: 256 Tests: 28 Failed: 1)
  Failed test:  23
  Non-zero exit status: 1
Files=59, Tests=752, 1241 wallclock secs ( 0.29 usr  0.08 sys + 11.13 cusr  1.60 csys = 13.10 CPU)
Result: FAIL
Failed 1/59 test programs. 1/752 subtests failed.
Makefile:946: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
-> FAIL Installing WWW::Mechanize failed. See /root/.cpanm/work/1543994046.20570/build.log for details. Retry with --force to force install it.

我在那里看到了这个,但我不确定它是什么意思:

#   Failed test '... and it was recorded in the history'
#   at t/history.t line 131.
#          got: '3'
#     expected: '2'
# Looks like you failed 1 test of 28.
t/history.t .............................. 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/28 subtests 

有什么建议么?我需要这个模块用于我要安装的另一个模块:/

linux
  • 1 个回答
  • 602 Views
Martin Hope
Andrew Newby
Asked: 2018-03-05 23:19:48 +0800 CST

设置自定义名称服务器

  • 0

我正在尝试为我的服务器设置我自己的名称服务器。到目前为止,我有:

  1. 通过安装bind9apt-get
  2. 更新了我的 DNS,所以我有:

    NS1.NEWBYHOST.COM => 213.219.38.44(也是 AAAA 记录)

    NS2.NEWBYHOST.COM => 213.219.38.44(也是 AAAA 记录)

  3. 它现在已经更新,并且 ping 正确:

PS C:\Users\Andy> ping NS1.NEWBYHOST.COM

使用 32 字节数据 Ping NS1.NEWBYHOST.COM [213.219.38.44]:来自 213.219.38.44 的回复:字节=32 时间=10ms TTL=54 来自 213.219.38.44 的回复:字节=32 时间=10ms TTL=54

213.219.38.44 的 Ping 统计信息:数据包:已发送 = 2,已接收 = 2,丢失 = 0(0% 丢失),以毫秒为单位的近似往返时间:最小值 = 10 毫秒,最大值 = 10 毫秒,平均 = 10 毫秒 Control-C PS C:\Users\Andy> ping NS2.NEWBYHOST.COM

使用 32 字节数据 Ping NS2.NEWBYHOST.COM [213.219.38.44]:来自 213.219.38.44 的回复:字节=32 时间=10ms TTL=54 来自 213.219.38.44 的回复:字节=32 时间=10ms TTL=54

213.219.38.44 的 Ping 统计信息:数据包:已发送 = 2,已接收 = 2,丢失 = 0(0% 丢失),以毫秒为单位的近似往返时间:最小值 = 10 毫秒,最大值 = 10 毫秒,平均值 = 10 毫秒

但是,当尝试在 GoDaddy 中更新我的域时,我收到一个错误:

在此处输入图像描述

我错过了什么?

domain-name-system
  • 1 个回答
  • 100 Views
Martin Hope
Andrew Newby
Asked: 2017-11-10 10:54:51 +0800 CST

使用 http2 加速 https 上的 nginx 请求

  • 0

我正在将我的网站完全迁移到 SSL,到目前为止,我已经迁移了移动版本。我遇到的问题是请求速度有点慢:

前: 在此处输入图像描述

后:

在此处输入图像描述

例如,最初的 HTML 页面(31.html)从 5 毫秒变为惊人的 303 毫秒:/

我假设这与我们现在使用 SSL 的事实有关。

我的 SSL 在我的域配置文件中设置得非常简单:

ssl         on;
ssl_certificate      /home/chambres/conf/web/ssl.chambresdhotes.org.pem;
ssl_certificate_key  /home/chambres/conf/web/ssl.chambresdhotes.org.key;

我可以使用其他任何技巧来帮助加快速度吗?我们首先在移动版本上推出它,以了解它将如何影响速度 - 我只是担心如果我们也将它转移到桌面版本(更重),它会使速度慢得多.

谢谢!

nginx
  • 1 个回答
  • 1085 Views
Martin Hope
Andrew Newby
Asked: 2017-10-25 01:56:28 +0800 CST

无法在 Ubuntu 16.04 服务器上安装 php-zip

  • 2

我正在尝试在我的服务器上安装php7.0-zip,以便我可以在 PHP 脚本中使用它,但我遇到了一个大错误:

sudo apt-get install php-zip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libzip4 php7.0 php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-pspell php7.0-readline php7.0-soap
  php7.0-xml php7.0-zip
The following NEW packages will be installed:
  libzip4 php-zip php7.0-zip
The following packages will be upgraded:
  php7.0 php7.0-cgi php7.0-cli php7.0-common php7.0-curl php7.0-fpm php7.0-gd php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-pspell php7.0-readline php7.0-soap
  php7.0-xml
19 upgraded, 3 newly installed, 0 to remove and 128 not upgraded.
Need to get 5,865 kB/5,903 kB of archives.
After this operation, 242 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-soap amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:2 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-mcrypt amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:3 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-mbstring amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:4 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-intl amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:5 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-imap amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:6 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-json amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:7 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-opcache amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:8 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-readline amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:9 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-cli amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:10 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-fpm amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:11 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-xml amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:12 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-pspell amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:13 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-mysql amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:14 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-ldap amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:15 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-gd amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:16 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-curl amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:17 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-cgi amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Ign:18 http://mirrors.linode.com/ubuntu xenial-updates/main i386 php7.0 all 7.0.18-0ubuntu0.16.04.1
Err:19 http://mirrors.linode.com/ubuntu xenial-updates/main amd64 php7.0-common amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:20 http://mirrors.linode.com/ubuntu xenial-updates/universe amd64 php7.0-zip amd64 7.0.18-0ubuntu0.16.04.1
  404  Not Found
Err:18 http://mirrors.linode.com/ubuntu xenial-updates/main i386 php7.0 all 7.0.18-0ubuntu0.16.04.1
  404  Not Found
E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-soap_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-mcrypt_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-mbstring_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-intl_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-imap_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-json_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-opcache_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-readline_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-cli_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-fpm_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-xml_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-pspell_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-mysql_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-ldap_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-gd_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-curl_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-cgi_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0_7.0.18-0ubuntu0.16.04.1_all.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/main/p/php7.0/php7.0-common_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Failed to fetch http://mirrors.linode.com/ubuntu/pool/universe/p/php7.0/php7.0-zip_7.0.18-0ubuntu0.16.04.1_amd64.deb  404  Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我错过了什么?--fix -missing会起作用吗?或者只是在不检查依赖项等的情况下安装它?

服务器详情如下:

PHP 7 Ubuntu 6.04

如果您需要任何其他详细信息(以及在哪里可以找到它们:),请告诉我

ubuntu-16.04
  • 1 个回答
  • 3951 Views
Martin Hope
Andrew Newby
Asked: 2017-08-17 00:56:48 +0800 CST

电子邮件服务器配置仍然抱怨连接不安全

  • 1

这是我对另一个问题的跟进,但它完全不同,所以我想我会开始一个新帖子。

电子邮件退回 - 由于临时原因,454 TLS 不可用

我试图弄清楚为什么在添加电子邮件帐户时仍然收到此错误消息(在这种情况下,在 Thunderbird 中 - 但我也遇到了手机上的问题);

在此处输入图像描述

奇怪的是,如果我在 SSL-Tools.net 上查看它,它看起来还不错:

https://ssl-tools.net/mailservers/wkingbrickwork.co.uk

我真的不明白 - 正如 Thunderbird 向我展示的那样,我的证书在这里已过期:

在此处输入图像描述

我错过了什么吗?如果您需要更多信息来帮助我调试,请告诉我。我不确定有什么帮助。

email
  • 1 个回答
  • 941 Views
Martin Hope
Andrew Newby
Asked: 2017-08-13 00:07:52 +0800 CST

Nginx 重写的多个条件

  • 3

我正在尝试找到重写此规则的最佳方法,以便它可以在 nginx 上运行:

   RewriteCond %{REQUEST_URI} !^/clip-art/.*$
   RewriteCond %{REQUEST_URI} !^/Clip-Art/.*$
   RewriteCond %{REQUEST_URI} !^/cgi-bin/.*$
   RewriteCond %{REQUEST_URI} !^/images/.*$
   RewriteCond %{REQUEST_URI} !/invitation/
   RewriteCond %{REQUEST_URI} !/designer/
   RewriteRule ^/(.*)/(.*)/(.*)/(.*)$ /clip-art/$1/$2/$3/$4 [r=301,nc,l]

我知道我可以做类似的事情:

   if ($request_uri !~ "/designer") {
       rewrite ^/(.*)/(.*)/(.*)/(.*)$ /clip-art/$1/$2/$3/$4 permanent;
   }

但显然这只适用于其中一个文件夹名称。如何使它与多个文件夹名称一起使用?

nginx
  • 2 个回答
  • 3603 Views
Martin Hope
Andrew Newby
Asked: 2017-07-26 23:58:14 +0800 CST

使用 Monit 在 Ubuntu 16.0.4 上监控 solr 服务

  • 0

我试图弄清楚为什么我的 Monit ( https://mmonit.com/monit/ ) 似乎不想监视我的 Solr 服务。我已经为其余的服务工作了:

在此处输入图像描述

但由于某种原因,Solr 不想正确监控。

我按照这里的例子:

https://www.webfoobar.com/node/61

对于我的服务器,我对其进行了一些调整,因此服务是正确的,还有一些路径:

## Solr monitoring.

## Test the solr service.
check process solr with pidfile /var/solr/solr-8983.pid
  group solr
  start program = "/etc/init.d/solr start"
  stop  program = "/etc/init.d/solr stop"
  restart program  = "/etc/init.d/solr restart"
  if failed port 8983 then restart
  if 3 restarts within 5 cycles then timeout
  depends on solr_bin
  depends on solr_init

## Test the process binary.
check file solr_bin with path /opt/solr/bin/solr
  group root
  if failed checksum then unmonitor
  if failed permission 755 then unmonitor
  if failed uid root then unmonitor
  if failed gid root then unmonitor

## Test the init scripts.
check file solr_init with path /etc/init.d/solr
  group root
  if failed checksum then unmonitor
  if failed permission 744 then unmonitor
  if failed uid root then unmonitor
  if failed gid root then unmonitor

检查语法一切正常:

  monit -t
/etc/monit/monitrc:295: Include failed -- Success '/etc/monit/conf.d/*'
Control file syntax OK

关于我可以尝试什么的任何其他建议?

更新:我真的不明白为什么这不起作用。所有权限和文件似乎都存在,并且设置正确:

root@admin:/etc/init.d# ls -l /var/solr/solr-8983.pid
-rw-rw-r-- 1 solr solr 6 Jul 28 05:41 /var/solr/solr-8983.pid


root@admin:/etc/init.d# ls -l /etc/init.d | grep solr
-rwxr--r-- 1 root root 2711 Jul 25 13:25 solr

root@admin:/etc/init.d# ls -l /opt/solr/bin/ | grep solr
-rwxr-xr-x 1 root root 12694 May 29 22:36 install_solr_service.sh
-rwxr-xr-x 1 root root  1255 Mar  9 20:00 oom_solr.sh
-rwxr-xr-x 1 root root 72389 May 30 00:25 solr
-rwxr-xr-x 1 root root 66010 May 30 00:25 solr.cmd
-rwxr-xr-x 1 root root  6204 May 30 00:25 solr.in.cmd.orig
-rwxr-xr-x 1 root root  6950 May 30 00:25 solr.in.sh.orig

更新 2:重新启动 Monit 时,我在monit.log中得到了这个:

[UTC Jul 28 10:22:45] info     : Shutting down Monit HTTP server
[UTC Jul 28 10:22:45] info     : Monit HTTP server stopped
[UTC Jul 28 10:22:45] info     : Monit daemon with pid [26662] stopped
[UTC Jul 28 10:22:45] info     : 'admin.steampunkjunkies.com' Monit 5.16 stopped
[UTC Jul 28 10:22:45] info     : Starting Monit 5.16 daemon with http interface at [213.219.38.44]:2812
[UTC Jul 28 10:22:45] info     : Starting Monit HTTP server at [213.219.38.44]:2812
[UTC Jul 28 10:22:45] info     : Monit HTTP server started
[UTC Jul 28 10:22:45] info     : 'admin.steampunkjunkies.com' Monit 5.16 started
ubuntu-16.04
  • 1 个回答
  • 1002 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