server {
listen 80;
server_name fpb.com;
return 301 http://www.fpb.com$request_uri;
} server
{
listen 80;
#listen [::]:80;
server_name www.fpb.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.fpb.com; include dedecms.conf;
#error_page 404 /404.html; # Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; } include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ /.well-known {
allow all;
} location ~ /\.
{
deny all;
} access_log off;
} server {
listen 80;
server_name m.fpb.com; location / {
root ../a;
proxy_pass http://www.fpb.com/m/;
}
#error_page 500 502 503 504 /50x.html;
} server {
listen 80;
server_name zg.fpb.com; location /templets/{
proxy_pass http://www.fpb.com/templets/;
} location /a/{
proxy_pass http://www.fpb.com/a/;
} location /uploads/{
proxy_pass http://www.fpb.com/uploads/;
}
location / {
proxy_pass http://www.fpb.com/a/;
}
#error_page 500 502 503 504 /50x.html;
}

ng配置301及反向代理示例的更多相关文章

  1. docker配置nginx做反向代理管理tomcat应用

    由于业务开始复杂,单一tomcat已经不足以满足业务需求,多tomcat部署起来不方便而且面临域名解析问题,因此开始增加反向代理,由于docker的易用性,便使用docker管理各个应用. docke ...

  2. nginx配置反向代理示例

    环境: nginx1:192.168.68.41 tomcat1:192.168.68.43 tomcat2:192.168.68.45 nginx安装网上很多教程,我是用yum安装的. 配置ngin ...

  3. nginx之旅(第三篇):代理、正向代理、反向代理、代理的原理、nginx反向代理场景、nginx反向代理配置、nginx反向代理语法

    一.代理服务与反向代理 什么是代理服务 代理-代理办理(代理理财.代理收货.代理购物等等). 一般情况下,如果没有特别说明,代理技术默认说的是正向代理技术.关于正向代理的概念如下: 正向代理(forw ...

  4. 在ubuntu上面配置nginx实现反向代理和负载均衡

    上一篇文章(http://www.cnblogs.com/chenxizhang/p/4684260.html),我做了一个实验,就是利用Visual Studio,基于Nancy框架,开发了一个自托 ...

  5. ubuntu上配置nginx实现反向代理

    反向代理 反向代理(Reverse Proxy)方式是指以代理服务器来接受internet上的连接请求,然后将请求转发给内部网络上的服务器,并将从服务器上得到的结果返回给internet上请求连接的客 ...

  6. litespeed 下配置 伪静态,反向代理

    <IfModule mod_rewrite.c>RewriteEngine onRewriteBase / RewriteRule ^(.*).html$ index.php?static ...

  7. 配置一个nginx反向代理&负载均衡服务器

    一.基本信息 系统(L):CentOS 6.9 #下载地址:http://mirrors.sohu.com 反代&负载均衡(N):NGINX 1.14.0 #下载地址:http://nginx ...

  8. 通过Apache配置web服务器反向代理

    - 第一步: 到安装好的apache文件目录conf文件下,找到httpd.conf文件 找到如下配置,去掉#可以启动HTTP反向代理功能 : LoadModule proxy_module modu ...

  9. nginx for windows 配置多域名反向代理

    调试了很久...哦耶 共享出来吧 其实 nginx反向代理同一ip多个域名,给header加上host就可以了 upstream test.test.cn {        server   119. ...

随机推荐

  1. HDU2121:Ice_cream’s world II (虚根+有向图最小生成树)

    Ice_cream’s world II Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Oth ...

  2. # Codeforces Round #529(Div.3)个人题解

    Codeforces Round #529(Div.3)个人题解 前言: 闲来无事补了前天的cf,想着最近刷题有点点怠惰,就直接一场cf一场cf的刷算了,以后的题解也都会以每场的形式写出来 A. Re ...

  3. [LeetCode] 15. 3Sum ☆☆

    Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...

  4. [LeetCode] 12. Integer to Roman ☆☆

    Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...

  5. UVA 12034 Race

    https://vjudge.net/problem/UVA-12034 题意:n个人比赛,有多少种可能的结果 假设i个人中,有j个人是第一名,方案数为C(i,j) 所以ans=Σ C(n,j)* f ...

  6. Html5学习1(Html属性、Html CSS:)

    Html属性 1.Html要求使用小写属性. Html标题 1.确保将Html标题标签只用于标题.不要仅仅为了生成粗体或大号的文本而使用标题. 2.<hr>标签在Html页面中创建水平线, ...

  7. 01背包入门 dp

    题目引入: 有n个重量和价值分别为Wi,Vi的物品.从这些物品中挑选出总重量不超过W的物品,求所有挑选方案中的价值总和的最大值. 分析: 首先,我们用最普通的方法,针对每个物品是否放入背包进行搜索. ...

  8. JavaScript字符串逆序

    如何对字符串进行倒序呢?你首先想到的方法就是生成一个栈,从尾到头依次取出字符串中的字符压入栈中,然后把栈连接成字符串. var reverse = function( str ){ var stack ...

  9. 对象方法、类方法、原型方法 && 私有属性、公有属性、公有静态属性

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  10. 边绘边理解prototype跟__proto__

    网上流传着一张讲解prototype跟__proto__关系的图,尽管他已经描绘的很清楚了,但对于初学者来说,江太公感觉还是过于纠结,于是起心重绘,让他们之间的关系更加明晰可理解,一方面出于分享目的, ...