当我今天对我的网站进行负载测试时(使用blitz.io);尽管有大量 RAM(超过 50%)和 CPU 能力(超过 70%)可用,但结果显示我的网站在每秒达到一定数量的并发用户时开始超时。
我的网站的 Nginx 错误日志 (/var/log/nginx/example.com.error.log) 显示如下内容:
2013/02/12 19:03:57 [错误] 13749#0: *3175 connect() 到 unix:/var/run/php5-fpm.sock 在连接到上游时失败(11:资源暂时不可用),客户端: 54.123.456.46,服务器:example.com,请求:“GET / HTTP/1.1”,上游:“fastcgi://unix:/var/run/php5-fpm.sock:”,主机:“example.com”
谷歌搜索错误让我找到了这个答案,它指出使用 TCP\IP 连接而不是 unix 套接字作为问题的解决方案;因为unix套接字的“高负载情况下的问题是众所周知的”。
因此,正如答案所建议的:
我在 /etc/php5/fpm/pool.d/www.conf 中替换listen = /var/run/php5-fpm.sock为listen 127.0.0.1:9000
由于我的发行版(Debian Wheezy)上没有/etc/nginx/php_location,所以我没有采取任何措施。
fastcgi_pass unix:/var/run/php5-fpm.sock;由于我在站点的 Nginx 配置文件中使用,即 /etc/nginx/sites-available/example.com,因此我将其替换为fastcgi_pass 127.0.0.1:9000;
现在的问题是,当我502 Bad Gateway访问我的网站时出现错误。是的,我做了reloadNginx 和 PHP-FPM。我究竟做错了什么?(这里完全是新手,尽我最大努力边做边学。)
如果这是相关的,当我这样做时sudo service php5-fpm restart,我会收到此错误:
[FAIL] Restarting PHP5 FastCGI Process Manager: php5-fpm failed!
Run Code Online (Sandbox Code Playgroud)
这只是在我做出上述更改后才发生的。我怎样才能解决这个问题? …
如果我跑
# apt-get install sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
sendmail : Depends: sendmail-bin but it is not going to …Run Code Online (Sandbox Code Playgroud) 我从 Debian Squeeze 6 升级到 Wheezy 7,但似乎我使用的是旧内核。
# uname -r
2.6.32-042stab072.10
Run Code Online (Sandbox Code Playgroud)
但我安装了较新的内核
# dpkg --get-selections | grep linux-image
linux-image-2.6-amd64 install
linux-image-3.2.0-4-amd64 install
linux-image-amd64 install
Run Code Online (Sandbox Code Playgroud)
我该怎么办?
这是我升级的过程:
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove
reboot
echo '' > /etc/apt/sources.list
cat <<EOF >> /etc/apt/sources.list
deb http://mirrors.kernel.org/debian/ wheezy main
deb-src http://mirrors.kernel.org/debian/ wheezy main
deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main
deb http://http.debian.net/debian wheezy-updates main
deb-src http://http.debian.net/debian wheezy-updates main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
EOF
apt-get update
apt-get upgrade …Run Code Online (Sandbox Code Playgroud) 我在我的 Web 服务器上安装了 StartSSL,该服务器在 CentOS 6.5 上运行 Linux Apache。shaaaaaaaaaaaaa.com 说
好的。example.com 有一个使用 SHA-2 签名的可验证证书链。
但是 Debian 7.8 上的 Google Chrome 说
连接使用 AES_128_CBC 加密,使用 SHA1 进行身份验证,使用 ECDHE_RSA 作为密钥交换机制。
在 Debian 机器上,我做了
mkdir ~/StartComCerts
mv /etc/ssl/certs/StartCom* ~/StartComCerts
Run Code Online (Sandbox Code Playgroud)
问题就解决了。但是,预期客户对其计算机进行更改并不是一个可行的解决方案。所以我从 ssls.com 购买了 GeoTrust QuickSSL Premium 证书。然后我去了https://knowledge.geotrust.com/support/knowledge-base,它说“证书安装正确”。但是,当我在 Debian 7.8 上使用 Chrome 访问我的网站时,我收到以下消息:
此站点使用弱安全配置(SHA-1 签名),因此您的连接可能不是私密的。
和
该网站正在使用过时的安全设置,这可能会阻止未来版本的 Chrome 能够安全地访问它。
我在 www.ssllabs.com/ssltest/analyze.html 上测试了我的网站。它给我的网站打了 A,并说我的签名算法是 SHA256withRSA。我去了 shaaaaaaaaaaaaa.com 说
好的。example.com 有一个使用 SHA-2 签名的可验证证书链。
我去了whynopadlock.com,一切都得到了肯定。我还在另一台运行 Windows 7 的计算机上使用 Chrome 进行了测试,得到了一个没有错误消息的绿色挂锁。
我不知道为什么我在 Debian 上的 Chrome 上收到 SHA-1 错误。 …
我的 syslog 运行正常,但出于好奇如何检查 syslog 守护进程正在运行。无论如何我可以检查状态,如 apache
root@server1:/etc# /etc/init.d/apache2 status
Apache2 is running (pid 12894).
Run Code Online (Sandbox Code Playgroud)
我正在运行 Debian wheezy。提前致谢。
我刚刚将 Debian Lenny box 升级到 Wheezy,发现 suidperl 不见了。谷歌搜索显示上游维护者删除了它;
我需要suidperl 来运行我们的邮件安装,Open Webmail。
我没有时间做这个。
谷歌搜索没有发现简单的解决方法。
这里有人知道如何在 wheezy 上获得 suidperl 吗?简单地?谢谢。
我在没有 cpanel 的Debian 7上安装了nginx。
我正在像这样设置我的 Crontab:
*/45 * * * * wget "http://example.com/cron-url.php" >/dev/null 2>&1
Run Code Online (Sandbox Code Playgroud)
上面的 cron 被 403 forbidden 阻塞了:
--2014-12-10 05:40:01-- http://example.com/cron-url.php
Connecting to xyz.xx.xx.xxx:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2014-12-10 05:40:01 ERROR 403: Forbidden.
Run Code Online (Sandbox Code Playgroud)
在这里搜索并谷歌搜索后,我了解到我的服务器可能正在阻止 wget。我查看了我的 nginx 配置文件,我认为应该是由于以下原因:
if ($http_user_agent ~* LWP::Simple|BBBike|wget) {
return 403;
}
Run Code Online (Sandbox Code Playgroud)
对于 cron 命令,我必须使用它的 url,并且脚本路径的绝对链接不起作用。现在,如果我需要允许 cron 工作而不被阻止,我该怎么办?我在想也许我需要从我自己的服务器上允许 wget,但不知道如何使用 nginx 来做到这一点。有人可以帮我解决这个 cron 问题吗?
我需要安装 git 1.8.* 版本。
apt-get remove git;删除当前安装的 gitapt-get update以更新我的包列表aptitude show git 仍然显示 Version: 1:1.7.10.4-1+wheezy1我在做什么错?
这是我的 /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian/ wheezy main
deb-src http://ftp.de.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
# wheezy-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ wheezy-updates main
deb-src http://ftp.de.debian.org/debian/ wheezy-updates main
# deb multimedia
deb http://www.deb-multimedia.org wheezy main non-free
# wheezy backpors
deb http://ftp.de.debian.org/debian wheezy-backports main
Run Code Online (Sandbox Code Playgroud)
PS我也尝试执行apt-get install git --reinstall,但没有效果-版本仍然是1.7
PPS 是的,我确定它应该是 1.8。在向后移植: …
我正在尝试在 Debian (Wheezy) 下使用 IPtables 设置一些规则,并且我认为遇到了一些问题。
INPUT 的策略设置为 DROP。这是否会根据我放入 INPUT 的规则删除所有内容,或者它是否像某些路由器中的标准 ACL 列表,这意味着与语句不匹配的所有内容(如果它们设置为 ACCEPT)将导致 DROP?
以此为例:
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpts:ftp-data:ftp
Run Code Online (Sandbox Code Playgroud)
这些 ftp 数据包会丢失还是会被接受而其他所有内容都会丢失?
我希望我不会把它搞砸太多。
我目前正在尝试“强化”我的所有服务器,首先是关闭我不需要的所有服务。
这是一个 nginx 反向代理,metasploit 说 smb 445 tcp 已过滤 http://gyazo.com/6adcdcf4982801f481b8338d913545bb
但我找不到在此端口上运行的任何服务:service --status-all
[ + ] bind9
[ - ] bootlogs
[ ? ] bootmisc.sh
[ ? ] checkfs.sh
[ ? ] checkroot-bootclean.sh
[ - ] checkroot.sh
[ + ] cron
[ + ] fail2ban
[ - ] fetchmail
[ - ] hostname.sh
[ ? ] hwclock.sh
[ - ] kbd
[ - ] keymap.sh
[ ? ] killprocs
[ ? ] kmod
[ ? ] modules_dep.sh
[ - ] motd …Run Code Online (Sandbox Code Playgroud)