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

Delirium's questions

Martin Hope
Delirium
Asked: 2020-09-16 01:20:16 +0800 CST

php无法处理透明png

  • 0

我使用php7.1、7.0和7.3都是php-fpm。

当我在网站上尝试本地机器PNG图片时,透明背景没问题。但是当我将它推到服务器上时,黑色的背景不透明。

知道问题出在哪里吗?我已经安装php-imagick

debian php-fpm apache2
  • 1 个回答
  • 96 Views
Martin Hope
Delirium
Asked: 2020-07-30 23:51:05 +0800 CST

是否可以在一行上重写此重启脚本?

  • 0

我想知道是否可以在一行上重写下面的这个脚本?可能与||?

ps auxw | grep nagios-nrpe-server | grep -v grep > /dev/null

if [ $? != 0 ]
then
        /etc/init.d/nagios-nrpe-server start > /dev/null
fi

我试过ps auxw | grep nagios-nrpe-server | grep -v grep > /dev/null || /etc/init.d/nagios-nrpe-server start了,但它一直在重启服务,即使它正在运行..

debian service bash
  • 2 个回答
  • 112 Views
Martin Hope
Delirium
Asked: 2020-04-30 04:34:44 +0800 CST

Docker 映像中的应用程序如何将主机名从 localholst 更改为 public

  • 0

我刚刚使用了这个 docker 映像https://github.com/netbox-community/netbox-docker/,但我无法弄清楚如何将其配置为在公共主机名/IP 上工作?

我正在阅读文档并试图弄清楚,但我被卡住了。

我找到nginx.conf并编辑了hostnameURL,但它确实有效。

daemon off;
worker_processes 1;

error_log /dev/stderr info;

events {
    worker_connections 1024;
}

http {
    include              /etc/nginx/mime.types;
    default_type         application/octet-stream;
    sendfile             on;
    tcp_nopush           on;
    keepalive_timeout    65;
    gzip                 on;
    server_tokens        off;
    client_max_body_size 10M;

    server {
        listen 11.22.33.44:8080;
        server_name netbox.domain.tld;

    #    listen      8080;
        access_log  off;

        location /static/ {
            alias /opt/netbox/netbox/static/;
        }

        location / {
            proxy_pass http://netbox:8001;
            proxy_set_header X-Forwarded-Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
            add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
        }
    }
}
nginx docker
  • 1 个回答
  • 370 Views
Martin Hope
Delirium
Asked: 2020-04-24 01:05:13 +0800 CST

Ansible“是”和“否”安装可能性

  • 1

是否可以用“是”和“否”的问题提示用户?我确定它在那里,但我需要它在“是”答案上安装软件包,而“否”只是跳过软件包。如何有效地做到这一点?谢谢。

ansible ansible-playbook
  • 2 个回答
  • 3494 Views
Martin Hope
Delirium
Asked: 2020-04-18 14:40:28 +0800 CST

Nagios 警告 CHECK_NRPE: Socket timeout after 30 seconds but it is running

  • 0

我的服务器上有 nagios,它正在提醒我

CHECK_NRPE: Socket timeout after 30 seconds. 

但我的服务正在运行:

● nagios-nrpe-server.service - Nagios Remote Plugin Executor
   Loaded: loaded (/lib/systemd/system/nagios-nrpe-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-04-18 00:31:56 CEST; 6min ago
     Docs: http://www.nagios.org/documentation
  Process: 4841 ExecStopPost=/bin/rm -f /var/run/nagios/nrpe.pid (code=exited, status=0/SUCCESS)
 Main PID: 4845 (nrpe)
    Tasks: 5 (limit: 4915)
   CGroup: /system.slice/nagios-nrpe-server.service
           ├─4845 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
           ├─6346 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
           ├─6347 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
           ├─6348 sh -c /usr/lib/nagios/plugins/check_disk -e -w 5% -W 3% -c 2% -K 2% -X tmpfs
           └─6349 /usr/lib/nagios/plugins/check_disk -e -w 5% -W 3% -c 2% -K 2% -X tmpfs

我试图杀死它,重新启动它,重新启动正在处理所有警报的 nagios 服务器,但没有任何效果。它从无到有,并且不知道有什么问题,因为所有其他 nagios 的服务器都在工作。

debian nagios
  • 1 个回答
  • 2248 Views
Martin Hope
Delirium
Asked: 2020-04-08 23:46:05 +0800 CST

重新初始化自定义 debian 源列表

  • 0

我刚刚将新包添加到./dists/buster/main/binary-amd64/Packages.. 我如何重新初始化它?我假设我必须重新初始化它,因为当我这样做时,apt update我看不到我刚刚添加的包。

debian package-management
  • 1 个回答
  • 29 Views
Martin Hope
Delirium
Asked: 2020-04-07 00:53:32 +0800 CST

内存使用超过 90% 时重启服务

  • 1

我不确定这是否可能,但是当内存已经使用超过 90% 时,我可以以某种方式重新启动服务吗?

我的意思是脚本会检查内存,如果内存使用率超过 90%,它会重新启动/执行我的服务重新启动?

debian bash
  • 2 个回答
  • 1991 Views
Martin Hope
Delirium
Asked: 2020-04-02 06:40:32 +0800 CST

每个邮件服务器上的后缀超时

  • 0

我只是在服务器上没有足够的 inode 后遇到了问题,我修复了这个 postfix 问题。我使用
dovecot+amavis+spamassasin+dovecot+postfix

我发现了这个错误

postfix/smtpd[1775]:警告:主机名 foo.domain.tld 无法解析为地址

电子邮件现在卡在 mailq 中,看起来像这样:

(交付暂时暂停:连接到 alt2.gmail-smtp-in.l.google.com[142.250.4.26]:25:连接超时)[email protected]

我已经尝试过:

import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C RESOLV_MULTI=on

和

smtp_host_lookup = native

可悲的是,这些都不起作用。

这是我的

/etc/hosts

127.0.0.1 localhost
127.0.1.1 foo.domain.tld  foo

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/postfix/main.conf

 See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file = /etc/ssl/ansible/cert.pem
smtpd_tls_key_file = /etc/ssl/ansible/key.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = foo.domain.tld
alias_maps = 

alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = foo.domain.tld
relayhost = 
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4, ipv6
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
message_size_limit = 52428800
smtp_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_exclude_ciphers = RC4, aNULL
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
smtp_tls_security_level = may
owner_request_special = no
body_checks = regexp:/etc/postfix/body_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
header_checks = regexp:/etc/postfix/header_checks
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
smtpd_client_message_rate_limit = 100
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re , permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
smtpd_helo_required = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
smtpd_tls_security_level = may
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
greylisting = check_policy_service inet:127.0.0.1:10023
smtpd_restriction_classes = greylisting
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = no
smtpd_sasl_auth_enable = yes
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uids.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_alias_domains = 
smtpd_tls_CAfile = /etc/ssl/ansible/ca.pem
domain-name-system postfix
  • 1 个回答
  • 325 Views
Martin Hope
Delirium
Asked: 2020-01-23 03:24:32 +0800 CST

现在允许源 IP 做特定的端口

  • 0

我想1.2.3.4通过 nftables 允许端口 3306 上的 IP,但我无法找到如何实际插入端口?

我正在尝试类似的东西nft insert saddr 1.2.3.4.5 ip daddr server_ip accept

firewall
  • 1 个回答
  • 366 Views
Martin Hope
Delirium
Asked: 2019-03-01 02:50:30 +0800 CST

日志中 sftp 用户的唯一 ID

  • 0

我在 /var/log/auth.log 中记录 SFTP 行为。输出看起来像这样

May 27 05:58:16 test-server sshd[20044]: User child is on pid 20049
May 27 05:58:16 test-server sshd[20049]: subsystem request for sftp by user test-user
May 27 05:58:16 test-server internal-sftp[20050]: session opened for local user test-user from [192.168.1.1]
May 27 05:58:16 test-server internal-sftp[20050]: received client version 3
May 27 05:58:16 test-server internal-sftp[20050]: realpath "."
May 27 05:58:21 test-server internal-sftp[20050]: opendir "/home/test-user/"
May 27 05:58:21 test-server internal-sftp[20050]: closedir "/home/test-user/"
May 27 05:58:21 test-server internal-sftp[20050]: lstat name "/home/test-user/upload"
May 27 05:58:21 test-server internal-sftp[20050]: realpath "/home/test-user/upload/"
May 27 05:58:21 test-server internal-sftp[20050]: stat name "/home/test-user/upload"
May 27 05:58:24 test-server internal-sftp[20050]: open "/home/test-user/upload/test-file.pdf" flags WRITE,CREATE,TRUNCATE mode 0664
May 27 05:58:25 test-server internal-sftp[20050]: close "/home/test-user/upload/test-file.pdf" bytes read 0 written 1282941

但是,新会话的 ID 总是会发生变化。是否有可能为每个用户的每个会话拥有相同的 ID?例如,用户“child”将拥有他所有的会话 ID 20050。

我正在寻找这个或类似的解决方案,以便我可以将其解析到我的系统并记录用户行为。

debian
  • 1 个回答
  • 156 Views
Martin Hope
Delirium
Asked: 2016-05-17 22:31:32 +0800 CST

带有 nginx 的 Web 服务器的 SSL

  • 0

我对 SSL 完全不熟悉,所有的教程都让我很困惑。

我想问你一件事 - 我从 rapidssl 获得了这两个证书:intermediate.crt 和 web_server.crt。我不得不结合

cat intermediate.crt >> web_server.crt

我生成了 server.key 和 server.csr

通过openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

我尝试使用 RapidSSL 提供的 server.key 和 web_server.crt 并且出现此错误SSL_CTX_use_PrivateKey_file("/etc/ssl/server.key") failed (SSL: error:0B080074:x509 certificate

ssl nginx
  • 1 个回答
  • 53 Views
Martin Hope
Delirium
Asked: 2016-02-24 03:04:06 +0800 CST

nginx用wordpress重写链接

  • 1

我在这条路线上的 WP 博客上断开了链接

www.site.com/wp-content/plugins/download-monitor/download.php?id=1

但是当我想将它重定向到完全新的站点时,我的重写规则不起作用。我用这个

  rewrite ^(/wp-content/plugins/download-monitor/download.php?id=1)(.*)$   http://link.com/my.pdf$2 permanent;
nginx
  • 1 个回答
  • 501 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