我使用php7.1、7.0和7.3都是php-fpm。
当我在网站上尝试本地机器PNG图片时,透明背景没问题。但是当我将它推到服务器上时,黑色的背景不透明。
知道问题出在哪里吗?我已经安装php-imagick
我想知道是否可以在一行上重写下面的这个脚本?可能与||
?
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
了,但它一直在重启服务,即使它正在运行..
我刚刚使用了这个 docker 映像https://github.com/netbox-community/netbox-docker/
,但我无法弄清楚如何将其配置为在公共主机名/IP 上工作?
我正在阅读文档并试图弄清楚,但我被卡住了。
我找到nginx.conf
并编辑了hostname
URL,但它确实有效。
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"';
}
}
}
是否可以用“是”和“否”的问题提示用户?我确定它在那里,但我需要它在“是”答案上安装软件包,而“否”只是跳过软件包。如何有效地做到这一点?谢谢。
我的服务器上有 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 的服务器都在工作。
我刚刚将新包添加到./dists/buster/main/binary-amd64/Packages
.. 我如何重新初始化它?我假设我必须重新初始化它,因为当我这样做时,apt update
我看不到我刚刚添加的包。
我只是在服务器上没有足够的 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
我想1.2.3.4
通过 nftables 允许端口 3306 上的 IP,但我无法找到如何实际插入端口?
我正在尝试类似的东西nft insert saddr 1.2.3.4.5 ip daddr server_ip accept
我在 /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
。
我正在寻找这个或类似的解决方案,以便我可以将其解析到我的系统并记录用户行为。
我对 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
我在这条路线上的 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;