server {
listen 80;
server_name t-cl.orangevip.com;
rewrite ^(.*)$ https://$host$1 permanent;
}

server {
listen 443;
server_name t-cl.orangevip.com;
charset utf-8;
gzip_min_length 20;

root /data/www/otm_build/nweb/;
access_log logs/cl_access.log main;

ssl on;
ssl_certificate /usr/local/nginx/cert/214719813310685.pem;
ssl_certificate_key /usr/local/nginx/cert/214719813310685.key;

if ($http_user_agent ~* "qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|YoudaoBot|Sosospider") {
return 403;
}

if ( $http_user_agent ~* "(Android|iPhone|Windows Phone|UC|Kindle)" ){
rewrite ^/(.*)$ https://t-m.orangevip.com$uri permanent;
}

location / {
if ($request_uri !~* \.(js|css|png|jpg|gif|jpeng|woff|bmp|svg|xml|pdf))
{
add_header Set-Cookie "ogreferrer=$http_referer;path=/";
}
proxy_pass http://nuxtserver1;
proxy_set_header referer $http_referer;
}
location ~* MP_verify_8MbQcTrP1mylRiqR\.txt {
try_files $uri $uri/;
}

#location ~ ^/m {
# rewrite ^/(.*)$ https://t-m.orangevip.com$uri permanent;
#}

#location /m/ {
# if ( $http_user_agent ~* "(Android|iPhone|Windows Phone|UC|Kindle)" ){
# rewrite ^/(.*)$ https://t-m.orangevip.com$uri permanent;
# }
# try_files $uri $uri/ /m/index.html;
#}
#location = /m {
# if ( $http_user_agent ~* "(Android|iPhone|Windows Phone|UC|Kindle)" ){
# rewrite ^/(.*)$ https://t-m.orangevip.com permanent;
# }
# try_files $uri $uri/ /m/index.html;
#}

#location / {
# try_files $uri/web $uri/web/ /web/index/index.html;
#}

#location ~.*\.(js|css|html|png|jpg)$ {
# expires 7d;
#}

}

移动端

server {
listen 80;
server_name t-m.orangevip.com;
rewrite ^(.*)$ https://$host$1 permanent;
}

server {
listen 443;
server_name t-m.orangevip.com;
charset utf-8;
gzip_min_length 20;

root /data/www/otm_build/m/;
access_log logs/m_access.log main;

ssl on;
ssl_certificate /usr/local/nginx/cert/214719813310685.pem;
ssl_certificate_key /usr/local/nginx/cert/214719813310685.key;

if ($http_user_agent ~* "qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|YoudaoBot|Sosospider") {
return 403;
}

location / {
if ($request_uri !~* \.(js|css|png|jpg|gif|jpeng|woff|bmp|svg|xml|pdf))
{
add_header Set-Cookie "ogreferrer=$http_referer;path=/";
}
proxy_pass http://nuxtserver2;
proxy_set_header referer $http_referer;
}

location = /m {
rewrite ^/(.*)$ https://t-m.orangevip.com permanent;
}

# location ~* MP_verify_8MbQcTrP1mylRiqR\.txt {
# try_files $uri $uri/;
# }

}

php

server {
listen 80;
server_name t-tiku.orangevip.com;
return 301 https://$server_name$request_uri;
}
server
{
listen 443;
server_name t-tiku.orangevip.com;

index index.php;
root /data/www/tecmz/public;

access_log logs/tiku_access.log;
ssl_certificate /usr/local/nginx/cert/214719813310685.pem;
ssl_certificate_key /usr/local/nginx/cert/214719813310685.key;

charset utf-8;

location ^~ /.git {
deny all;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9001;
# fastcgi_pass 192.168.0.163:9000;
fastcgi_index index.php;
#fastcgi_param PHP_VALUE "open_basedir=/data/www/:/tmp/:/var/tmp/";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ \.(gif|jpg|jpeg|png|bmp|ico|css|js)$ {
expires max;
}
location ~* \.(eot|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin '*';
}
}

各个nginx conf的虚拟主机的配置的更多相关文章

  1. 虚拟主机ip配置,nginx.conf文件配置及日志文件切割

    今天粗略整理了一下虚拟主机配置,nginx.conf文件的配置,及日志文件的切割,记录如下: nginx虚拟主机配置:1.IP地址配置,2.绑定ip地址和虚拟主机详情:1.ip地址的配置:ifconf ...

  2. 第四百零二节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署,uwsgi安装和启动,nginx的安装与启动,uwsgi与nginx的配置文件+虚拟主机配置

    第四百零二节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署,uwsgi安装和启动,nginx的安装与启动,uwsgi与nginx的配置文件+虚拟主机配置 软件版本  uwsgi- ...

  3. Nginx教程--02.Nginx虚拟主机的配置

    1.Nginx虚拟主机的配置 1.1 在conf目录下,使用命令 : vim nginx.conf 对上图解释: //全局区 worker _processes 1; //表示当前有1个工作的子进程, ...

  4. Nginx 虚拟主机 VirtualHost 配置

    Nginx 是一个轻量级高性能的 Web 服务器, 并发处理能力强, 对资源消耗小, 无论是静态服务器还是小网站, Nginx 表现更加出色, 作为 Apache 的补充和替代使用率越来越高. 我在& ...

  5. Nginx(二):虚拟主机配置

    什么是虚拟主机? 虚拟主机使用的是特殊的软硬件技术,它把一台运行在因特网上的服务器主机分成一台台“虚拟”的主机,每台虚拟主机都可以是一个独立的网站,可以具有独立的域名,具有完整的Intemet服务器功 ...

  6. nginx虚拟主机的配置

    nginx虚拟主机的配置 server { listen ; server_name 127.0.0.1; access_log off; root /var/www/html/; location ...

  7. apache 虚拟主机详细配置:http.conf配置详解

    apache 虚拟主机详细配置:http.conf配置详解 Apache的配置文件http.conf参数含义详解 Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd. ...

  8. Nginx多站点虚拟主机实现单独启动停止php-fpm、单独控制权限设置

    Nginx多站点虚拟主机实现单独启动停止php-fpm.单独控制权限设置 来源:osyunwei.com 作者:qihang01 发表于:2012-08-19 21:26 点击: 说明: 站点1:bb ...

  9. linux(十二)___Apache服务器用户认证、虚拟主机的配置

    创建xiangkejin  zhangsan两个用户 可看见文件中创建的两个用户: 建立虚拟目录并配置用户认证 ①建立虚拟目录 /xiangkejin ②在Apache的主配置文件httpd.conf ...

随机推荐

  1. 洛谷 P3807 【模板】卢卡斯定理

    P3807 [模板]卢卡斯定理 题目背景 这是一道模板题. 题目描述 给定n,m,p(1\le n,m,p\le 10^51≤n,m,p≤105) 求 C_{n+m}^{m}\ mod\ pCn+mm ...

  2. oracle dtrace for linux

    https://docs.oracle.com/cd/E37670_01/E37355/html/ol_config_dtrace.html#

  3. 学习swift从青铜到王者之swift结构体和类08

    定义 // 定义类 class StudentC{ } // 定义结构体 struct StudentS{ } 定义存储属性 // 定义类 class StudentC{ var name:Strin ...

  4. Hadoop架构设计、执行原理具体解释

    1.Map-Reduce的逻辑过程 如果我们须要处理一批有关天气的数据.其格式例如以下: 依照ASCII码存储.每行一条记录 每一行字符从0開始计数,第15个到第18个字符为年 第25个到第29个字符 ...

  5. Python中暂未解决的问题

    编写一个复杂的计算器,可以在通过GUI输出出来.参考代码http://www.cnblogs.com/BeginMan/p/3216093.html shelve模块中open()函数调用文件文件的路 ...

  6. 嵌入式开发之davinci---dm8127 ipipe

    http://blog.csdn.net/dog0138/article/details/4212576 http://e2e.ti.com/support/dsp/davinci_digital_m ...

  7. Sql数据库查询语言

    1.概述 Sql是一种面向数据库的结构化查询语言.是符合美国国家标准化组织ANSI的一种计算机标准语言. Sql具对数据库的操作有:增删改查.创建数据库.创建表.创建存储过程.创建视图等 RDBMS关 ...

  8. 关于 iOS 的 StoryBoard,接受的那一刻才发现她的美 - 当然美的事物都须要业心照料

    关于 iOS 的 StoryBoard,接受的那一刻才发现她的美 - 当然美的事物都须要业心照料 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循&quo ...

  9. 【iOS系列】-UIImageView帧动画相关属性介绍

    UIImageView帧动画相关属性介绍 1:相关属性: //An array of UIImage objects to use for an animation.存放UIImage对象,会按顺序显 ...

  10. ExtJs 中获取 radiobutton 的值

    ExtJs中使用radiobutton,想在ExtJs本身代码中(注意,不是在后台喔)获取 radioButton 的值,居然发现很难,无从下手的感觉.后来在网上寻寻觅觅,痛苦摸索之后,真是大跌眼镜. ...