#user  nobody;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} http {
include mime.types;
default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout ;
keepalive_timeout ;
upstream static_pools {
server 192.168.56.13; }
upstream upload_pools {
server 192.168.56.14; }
#gzip on; server {
listen ;
server_name localhost;
root /Data/www; location / {
if ($http_user_agent ~* "MSIE") {
proxy_pass http://static_pools;
}
if ($http_user_agent ~* "chrome") {
proxy_pass http://upload_pools;
}
# if ($http_user_agent ~* "Firefox") {
# proxy_pass http://xxx_pools;
# }
#安卓:android 苹果:iphone
          
index index.html; } error_page /50x.html;
location = /50x.html {
root html;
} } }

Nginx配置根据客户端设备转发的更多相关文章

  1. Nginx配置以及域名转发

    工程中的nginx配置 #user nobody; worker_processes 24; error_log /home/xxx/opt/nginx/logs/error.log; pid /ho ...

  2. 转发大神nginx配置详解

    序言 Nginx是lgor Sysoev为俄罗斯访问量第二的rambler.ru站点设计开发的.从2004年发布至今,凭借开源的力量,已经接近成熟与完善. Nginx功能丰富,可作为HTTP服务器,也 ...

  3. 【nginx配置】nginx做非80端口转发

    一个场景 最近在使用PHP重写一个使用JAVA写的项目,因为需要查看之前的项目,所以要在本地搭建一个Tomcat来跑JAVA的项目.搭建成功后,因为Tomcat监听的端口是8080,因此,访问的URL ...

  4. Nginx配置proxy_pass转发的/路径问题

    Nginx配置proxy_pass转发的/路径问题 在nginx中配置proxy_pass时,如果是按照^~匹配路径时,要注意proxy_pass后的url最后的/,当加上了/,相当于是绝对根路径,则 ...

  5. nginx 配置301转发

    学习nginx 推荐 http://www.nginx.cn/nginx-how-to 1. 设置域名解析 daijun.me 指向 234.33.22.21 2.主机234.33.22.21 ngi ...

  6. Nginx配置域名转发实例

    域名:cps.45wan.com   所在阿里云主机:123.35.9.12 45wan没有在阿里云备案 67wan已经在阿里云备案 阿里云主机(假如123.35.9.12)上原来的nginx配置: ...

  7. nginx配置SSL实现服务器/客户端双向认证

    http://blog.csdn.net/kunoy/article/details/8239653 本人不才,配置了两天,终于搞出来了,结合网上诸多博文,特此总结一下! 配置环境: Ubuntu 1 ...

  8. java nginx等代理或网关转发请求后获取客户端的ip地址,原理

    在没有网关或者反向代理软件情况下,java里获取客户端ip地址的方法是request.getRemoteAddr() 先解释下http协议和TCP协议: 网页默认是进行http连接了,http协议即超 ...

  9. nginx配置https转发http

    生成ssl证书: 1.首先要生成服务器端的私钥,运行时会提示输入密码,此密码用于加密key文件: openssl genrsa -des3 -out server.key 1024 2.去除key文件 ...

随机推荐

  1. Ubuntu搜狗输入法乱码情况

    cd ~/.config sudo rm -rf SogouPY* sogou*

  2. urlScan 配置阻止sql注入

    工具 urlscan_v31_x64 urlscan_v31_x86 URLScan是一个IIS下的ISAPI 筛选器,它能够限制服务器将要处理的HTTP请求的类型.通过阻止特定的 HTTP 请求,U ...

  3. eclipse自动添加版权信息

    Preference->Java->Code Style->Code Template->comments->Files->Edit 勾选上Automaticall ...

  4. springboot 学习笔记(七)

    (七)springboot整合activemq,消息消费,以及发送对象消息 1.springboot整合activemq发送消息,上一节已经介绍了,现在要对消息队列中的内容进行处理,下面写一个cons ...

  5. css3的transform变换scale和translate等影响jQuery的position().top和offset().top

    css3的transform变换scale和translate等影响jQuery的position().top和offset().top

  6. Thymeleaf的模板使用介绍

    参考网址: https://blog.csdn.net/hry2015/article/details/73476973 先定义一个html文件, 如下: 文件路径: templates/templa ...

  7. aar、jar、so的引入和aar打包包含so、aar、jar文件

    so依赖   1,先建本地仓库,指向so放置的目录

  8. linux中python安装

    1.查看当前环境中是否存在python安装包 [zyj@localhost ~]$ rpm -qa | grep python gnome-python2-gnome--.el6.x86_64 pyt ...

  9. ionic文本颜色

    需添加"ion-text"使"color='light'"生效 <div text-center ion-text color="light&q ...

  10. app再次进入数据不加载问题

    问题原因:触发点击事件在加载页面之前完成. 1.调整了一下页面加载顺序 2.增加了settime的时间