小编Luc*_*Luc的帖子

Nginx proxy_pass 响应被截断

我使用 nginx 将 https 请求代理到我的应用程序服务器(目前在 8443 上运行)。
这个应用服务器提供动态页面,其中一些包括 jquery 缩小版。
页面错误,因为 jquery 似乎被截断了......是否有文件大小限制或其他什么?

我的 nginx 配置如下:

server {
listen      443;
server_name my_serv.com;
ssl                 on;
ssl_certificate     certificate.pem;
ssl_certificate_key privatekey.pem;

keepalive_timeout 70;

location / {
  proxy_pass https://localhost:8443;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Host $http_host;
  proxy_buffering off;
  proxy_buffers 8 8k;
}
}
Run Code Online (Sandbox Code Playgroud)

nginx jquery node.js

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

检查 nginx 中的几个用户代理

我需要根据用户代理将流量重定向到一个后端或另一个后端。这是正确的做法吗?

server {
    listen      80;
    server_name my_domain.com;

    if ($http_user_agent ~ iPhone ) {
        rewrite     ^(.*)   https://m.domain1.com$1 permanent;
    }
    if ($http_user_agent ~ Android ) {
        rewrite     ^(.*)   https://m.domain1.com$1 permanent;
    }
    if ($http_user_agent ~ MSIE ) {
        rewrite     ^(.*)   https://domain2.com$1 permanent;
    }
    if ($http_user_agent ~ Mozilla ) {
        rewrite     ^(.*)   https://domain2.com$1 permanent;
    }
}
Run Code Online (Sandbox Code Playgroud)

nginx useragent

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

无法在全新的 Debian 6.0 上安装 Postgres 9.1

我有一个全新的 Debian 6.0 安装。我已经安装了 build-essential 并添加了:

deb http://backports.debian.org/debian-backports squeeze-backports main
Run Code Online (Sandbox Code Playgroud)

在 /etc/apt/sources.list

我现在尝试安装 Postgres 9.1,但出现以下错误:

The following packages have unmet dependencies:
 postgresql-9.1 : Depends: libpq5 (>= 9.1~) but 8.4.12-0squeeze1 is to be installed
                  Depends: postgresql-client-9.1 but it is not going to be installed
                  Depends: postgresql-common (>= 115~) but 113 is to be installed
Run Code Online (Sandbox Code Playgroud)

在安装 postgres 之前是否还有其他东西要安装?

postgresql debian

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

标签 统计

nginx ×2

debian ×1

jquery ×1

node.js ×1

postgresql ×1

useragent ×1