Squid'd 默认是作为 HTTP 代理运行;但是,此常见问题解答https://docstore.mik.ua/squid/FAQ-4.html#ss4.10说“将 Squid 与 socks5 一起使用无需更改。只需将通常的 -Dbind=SOCKSbind 等添加到编译行和 -lsocks 到链接行。”
这听起来很棒,除了我不知道基本语法之外我不会编写 c/c++ 代码,所以通常当我编译某些东西时,它是 ./configure 和 ./make。有时我必须修改 makefile 的编译行,但我不确定此处是否链接(尽管我了解链接的概念)。
通过“添加通常的 X 等”来准确解释要做什么也有点混乱,所以如果有人能在这里指出确切的步骤,这将是一个很大的帮助,因为它们似乎没有在任何地方详细说明。听起来并不难。
我已经为 HTTP 连接编译并正确运行了鱿鱼,但必须支持 SOCKS。
我有我的 digitalocean droplets 设置,所以我可以通过密钥文件登录到 ssh。这适用于 root 帐户,但如果我通过创建一个辅助帐户useradd,我能够进入该帐户的唯一方法是通过su。如果我尝试使用相同的密钥文件通过 ssh 登录,我会得到:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
Run Code Online (Sandbox Code Playgroud)
即使我将我的公钥添加到/home/user/.ssh/authorized_keys. 该怎么办?
这是一个 CentOS 7 服务器。
注意:我也尝试添加AllowUsers exampleuser root到/etc/ssh/sshd_config.
对于我的新服务器上的所有站点,似乎一旦nginx提供了一定数量的流量,它就会开始提供“错误 502 - 错误网关! ”。
让我们来看看一些日志和配置...
操作系统:Ubuntu 16.04(服务器)
硬件:6核,12GB内存
面板:ISPConfig
nginx 版本:1.10.3
来自/var/www/example/log/error.log:
11: Resource temporarily unavailable) while connecting to upstream, client: 216.170.123.179, server: example.com, request: "GET /KHFxygk9 HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php7.0-fpm/web3.sock:", host: "example.com", referrer: "http://example.com/"
2017/08/10 06:01:06 [error] 15408#15408: *31372 connect() to unix:/var/lib/php7.0-fpm/web3.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.3.114.12, server: example.com, request: "GET /jiPNQjwp HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php7.0-fpm/web3.sock:", host: "example.com", referrer: "http://example.com/"
Run Code Online (Sandbox Code Playgroud)
这是我的配置文件:
[www]
user = …Run Code Online (Sandbox Code Playgroud) 我的 nginx 不断崩溃并在浏览器中报告“坏网关”错误。Nginx 和 PHP-FPM 没有预先配置来处理大流量负载。我必须systemctl restart php7.0-fpm每小时安排一次cron 工作,以确保我的网站在运行时不会停留太久。让我们开始吧。
我从中得到的一些错误/var/log/php7.0-fpm.log:
[20-Sep-2017 12:08:21] NOTICE: [pool web3] child 3495 started
[20-Sep-2017 12:08:21] NOTICE: [pool web3] child 2642 exited with code 0 after 499.814492 seconds from start
[20-Sep-2017 12:32:28] WARNING: [pool web3] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 7 idle, and 57 total children
Run Code Online (Sandbox Code Playgroud)
nginx 日志中没有任何内容让我感到意外。如果我让它运行太长时间而不重新启动它 (PHP-FPM),我会收到网关错误。我已经尝试按照教程 3 次调整设置,但仍然不好。现在我可能已经完成了各种设置,但无论哪种方式都行不通。
/etc/nginx/nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 100000;
events …Run Code Online (Sandbox Code Playgroud)