以下配置只针对nsqadmin v1.1.0 (built w/go1.10.3)版本
#
# The default server
#
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location /nsq/ {
auth_basic "NSQ Administrator's Area";
auth_basic_user_file /root/nsq/bin/.htpasswd;
proxy_pass http://127.0.0.1:4171/;
# proxy_redirect default;
proxy_redirect http://127.0.0.1:4171/ /nsq/;
proxy_set_header Accept-Encoding ""; # no compression allowed or next won't work
sub_filter_types *;
sub_filter '/static/' '/nsq/static/';
sub_filter 'return"/api' 'return"/nsq/api';
sub_filter '<a class="navbar-brand" href="/">' '<a class="navbar-brand" href="/nsq/">';
sub_filter 'Router.extend({routes:{"":"topics","topics/(:topic)(/:channel)":"topic",lookup:"lookup","nodes(/:node)":"nodes",counter:"counter"}' 'Router.extend({routes:{"nsq/":"topics","nsq/topics/(:topic)(/:channel)":"topic","nsq/lookup":"lookup","nsq/nodes(/:node)":"nodes","nsq/counter":"counter"}';
sub_filter '<a class="link" href="/' '<a class="link" href="/nsq/';
sub_filter_once off;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
主要是因为NSQAdmin采用了backbone.js来做router
Nginx reverse proxy NSQAdmin的更多相关文章
-
Nginx应用-Location路由反向代理及重写策略 请求转发-URL匹配规则 NGINX Reverse Proxy
NGINX Docs | NGINX Reverse Proxy https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ ...
-
Nginx &; Reverse Proxy
Nginx & Reverse Proxy https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ https:/ ...
-
正向代理 forward proxy、反向代理 reverse proxy、透明代理 transparent proxy nginx反向代理原理和配置讲解 防止外部客户机获取内部内容服务器的重定向 URL 缓存命中
[大型网站技术实践]初级篇:借助Nginx搭建反向代理服务器 - Edison Chou - 博客园http://www.cnblogs.com/edisonchou/p/4126742.html 图 ...
-
Master Nginx(5) - Reverse Proxy Advanced Topics
Security through separtion Encrypting traffic with SSL Authenticating clients using SSL Blocking tra ...
-
反向代理(Reverse Proxy)
反向代理(Reverse Proxy)方式是指以代理服务器来接受internet上的连接请求,然后将请求转发给内部网络上的服务器,并将从服务器上得到的结果返回给internet上请求连接的客户端,此时 ...
-
an open source web server and reverse proxy
https://www.nginx.com/resources/admin-guide/ NGINX is an open source web server and reverse proxy th ...
-
反向代理Reverse proxy
https://www.zhihu.com/question/24723688/answer/160252724 反向代理在计算机世界里,由于单个服务器的处理客户端(用户)请求能力有一个极限,当用户的 ...
-
正向代理 forward proxy、反向代理 reverse proxy、透明代理 transparent proxy
https://zh.wikipedia.org/wiki/反向代理 反向代理在计算机网络中是代理服务器的一种.服务器根据客户端的请求,从其关系的一组或多组后端服务器(如Web服务器)上获取资源,然后 ...
-
Forward Proxy &; Reverse Proxy | 正向代理 和 反向代理
对请求和响应内容不做修改的转发的服务器,被称为代理服务器.代理服务器分为两种类型:正向代理 和 反向代理. 正向代理:面向互联网,从更广范围获取信息的代理. 反向代理:面向内部,一般用于某企业的网站的 ...
随机推荐
-
JS魔法堂:ES6新特性——GeneratorFunction介绍
一.前言 第一次看koajs的示例时,发现该语句 function *(next){...............} ,这是啥啊?于是搜索一下,原来这是就是ES6的新特性Generator ...
-
Windows Azure Redis 缓存服务
8月20日,Windows Azure (中国版)开始提供Redis缓存服务,比较国际版的Microsoft Azure晚了差不多一年的时间.说实话,微软真不应该将这个重要的功能delay这么长时间, ...
-
java byte[]生成
1. ByteArrayOutputStream extends OutputStream 提供了一个byte数组,和记录写入数组值个数的类. a.实现了write(int)这个抽象函数,这里默认只写 ...
-
HDU1159 &;&; POJ1458:Common Subsequence(LCS)
Problem Description A subsequence of a given sequence is the given sequence with some elements (poss ...
-
asp.net cookie的使用.
Cookie就是服务器暂时存放在你的电脑里的资料(.txt格式的文本文件),好让服务器用来辨认你的计算机.当你在浏览网站的时候,Web服务器会先送一小小资料放在你的计算机上,Cookies 会帮你在网 ...
-
小程序坑之 swiper组件
表现:swiper 内容 空白 原因:swiper组件的current值为n时,重新刷新页面,current值不变,当刷新后的swiper item的数量少于 n 时,swpier找不到对应的item ...
-
python之路---03 整型 bool 字符串 for循环
十三.整型(int) 基本操作: 1.+ - * / % // ** 2. .bit_length() 计算整数在内存中占⽤的⼆进制码的⻓度 如: 十四.布尔值(bool) True False ...
-
技术揭秘“QQ空间”自动转发不良信息
大家经常会看到QQ空间自动转发一些附带链接的不良信息,即便我们的QQ密码并没有被盗取.最近通过对一个QQ空间自动转发链接进行分析,发现该自动转发机制通过利用腾讯网站存在漏洞的页面,精心构造出利用代码获 ...
-
Phalcon Framework的MVC结构及启动流程分析
目前的项目中选择了Phalcon Framework作为未来一段时间的核心框架.技术选型的原因会单开一篇Blog另说,本次优先对Phalcon的MVC架构与启动流程进行分析说明,如有遗漏还望指出. P ...
-
IntelliJ IDEA导出设置
导出: [File]->[Export Settings] 导入: [File]->[Import Settings]