小编Ale*_*Flo的帖子

使用上游 SSL 将 Nginx 配置为反向代理

我尝试将 Nginx 服务器配置为反向代理,以便它从客户端收到的 https 请求也通过 https 转发到上游服务器。

这是我使用的配置:

http {

    # enable reverse proxy
    proxy_redirect              off;
    proxy_set_header            Host            $http_host;
    proxy_set_header            X-Real-IP       $remote_addr;
    proxy_set_header            X-Forwared-For  $proxy_add_x_forwarded_for;

    upstream streaming_example_com 
    {
          server WEBSERVER_IP:443; 
    }

    server 
    {
        listen      443 default ssl;
        server_name streaming.example.com;
        access_log  /tmp/nginx_reverse_access.log;
        error_log   /tmp/nginx_reverse_error.log;
        root        /usr/local/nginx/html;
        index       index.html;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_certificate /etc/nginx/ssl/example.com.crt;
        ssl_certificate_key /etc/nginx/ssl/example.com.key;
        ssl_verify_client off;
        ssl_protocols        SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers RC4:HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;


        location /
        {
            proxy_pass  https://streaming_example_com;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

无论如何,当我尝试使用反向代理访问文件时,这是我在反向代理日志中得到的错误:

2014/03/20 12:09:07 [错误] 4113079#0:*1 SSL_do_handshake() …

ssl nginx reverse-proxy

49
推荐指数
3
解决办法
10万
查看次数

smartd 是否正确配置为通过电子邮件发送警报?

我刚刚按如下方式配置了 Debian 服务器
apt-get install smartmontools
vi /etc/default/smartmontools - 在这里取消注释这两行
# uncomment to start smartd on system startup
start_smartd=yes
# uncomment to pass additional options to smartd on startup
smartd_opts="--interval=1800"

然后我编辑了 /etc/smartd.conf 并只取消了这一行的注释
DEVICESCAN -S on -o on -a -m myemail@mydomain.com -s (S/../.././02|L/../../6/03)

我想知道这是否足以让系统在出现问题时向我发送警报消息和/或是否有办法模拟问题并查看 smartd 是否通过电子邮件向我发送警告。

smart smartctl

18
推荐指数
1
解决办法
2万
查看次数

SPDY & Nginx 上传问题

我有这个设置:一个带有 php-fpm 和http://blueimp.github.io/jQuery-File-Upload/的 Nginx 服务器

当我尝试在大约 10MB 后上传文件时失败。激活 SPDY 时会发生这种情况。当 SPDY 关闭时,上传工作正常。

有没有人知道这个问题的解决方法/修复?

php nginx php-fpm spdy

6
推荐指数
1
解决办法
289
查看次数

无法删除 ext4 文件系统上的挂载选项“丢弃”

我尝试在 ext4 文件系统上关闭“丢弃”,但我无法成功。
我尝试在其中添加“nodiscard”选项,/etc/fstab但仍然可以看到:

# tune2fs -l /dev/md2|grep disca
Default mount options:    journal_data_writeback user_xattr acl discard
Run Code Online (Sandbox Code Playgroud)

debian mount fstab

4
推荐指数
1
解决办法
2571
查看次数

运行“find”命令会产生高负载

我在 SSD 驱动器配置为 RAID 1 的 Debian 服务器上运行此命令:
ionice -c 3 find . -type f -amin -1440 -mmin +1441 -not -path custom/ -print0
在包含超过 170 万个文件和目录的路径上。

我注意到每次运行此命令时,服务器负载都会达到峰值,我想知道是否有任何方法可以限制find速度,使其不会产生如此高的负载。
另外我想知道这里是否有特定于 SSD 的选项以减少负载生成find

linux debian find ssd performance-tuning

3
推荐指数
1
解决办法
2492
查看次数

标签 统计

debian ×2

nginx ×2

find ×1

fstab ×1

linux ×1

mount ×1

performance-tuning ×1

php ×1

php-fpm ×1

reverse-proxy ×1

smart ×1

smartctl ×1

spdy ×1

ssd ×1

ssl ×1