- 浏览: 279685 次
文章分类
- 全部博客 (276)
- burp+hydra暴力破解 (1)
- kali linux工具集 (6)
- kali (59)
- linux (54)
- password (14)
- web (63)
- 渗透测试 (50)
- windows (40)
- metasploit (9)
- 信息收集 (32)
- burp suit (4)
- 安全审计 (9)
- https://github.com/secretsquirrel/the-backdoor-factory (0)
- nmap (4)
- arachni (2)
- 工具 (5)
- sql (3)
- 网络 (2)
- 后渗透测试 (10)
- 内网 (5)
- 无线 (2)
- C (3)
- bios (1)
- RoR (12)
- mongodb (1)
- linxu (1)
- gdb (1)
- linux,虚拟化 (1)
- python (4)
最新评论
based on our case, we need to handle two different url request:
example/0.5/xxx ==> 192.168.1.100:8080/xxx
example/0.7/xxx ==> 192.168.1.101:8080/xxx
Here is the configuration:
root@p1:/etc/nginx/conf.d# cat /etc/nginx/conf.d/default.conf
## Basic reverse proxy server ##
## Apache (vm02) backend for www.example.com ##
upstream developserver {
server 192.168.1.100:8080; #Develop Server
}
## Lighttpd (vm01) backend for static.example.com ##
upstream productionserver {
server 192.168.1.100:8080; #Production Server
}
## Start www.example.com ##
server {
listen 10.0.3.138:80; # ip address of proxy server
server_name www.example.com;
access_log /var/log/nginx/www.example.access.log main;
error_log /var/log/nginx/www.example.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
## send request back to apache1 ##
location /0.5 {
rewrite /0\.5/(.*) /$1 break;
proxy_pass http://developserver;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /0.7 {
proxy_pass http://productionserver;
rewrite /0\.7/(.*) /$1 break;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host static.example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
root@p1:/etc/nginx/conf.d# diff -u /etc/nginx/nginx.conf.bkp /etc/nginx/nginx.conf
--- /etc/nginx/nginx.conf.bkp 2015-08-28 14:09:19.744354204 +0800
+++ /etc/nginx/nginx.conf 2015-08-28 14:55:35.264441341 +0800
@@ -22,7 +22,9 @@
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
-
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"';
include /etc/nginx/mime.types;
default_type application/octet-stream;
example/0.5/xxx ==> 192.168.1.100:8080/xxx
example/0.7/xxx ==> 192.168.1.101:8080/xxx
Here is the configuration:
引用
root@p1:/etc/nginx/conf.d# cat /etc/nginx/conf.d/default.conf
## Basic reverse proxy server ##
## Apache (vm02) backend for www.example.com ##
upstream developserver {
server 192.168.1.100:8080; #Develop Server
}
## Lighttpd (vm01) backend for static.example.com ##
upstream productionserver {
server 192.168.1.100:8080; #Production Server
}
## Start www.example.com ##
server {
listen 10.0.3.138:80; # ip address of proxy server
server_name www.example.com;
access_log /var/log/nginx/www.example.access.log main;
error_log /var/log/nginx/www.example.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
## send request back to apache1 ##
location /0.5 {
rewrite /0\.5/(.*) /$1 break;
proxy_pass http://developserver;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /0.7 {
proxy_pass http://productionserver;
rewrite /0\.7/(.*) /$1 break;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host static.example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
引用
root@p1:/etc/nginx/conf.d# diff -u /etc/nginx/nginx.conf.bkp /etc/nginx/nginx.conf
--- /etc/nginx/nginx.conf.bkp 2015-08-28 14:09:19.744354204 +0800
+++ /etc/nginx/nginx.conf 2015-08-28 14:55:35.264441341 +0800
@@ -22,7 +22,9 @@
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
-
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
+ '"$status" $body_bytes_sent "$http_referer" '
+ '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"';
include /etc/nginx/mime.types;
default_type application/octet-stream;
发表评论
-
使用GCC/GNU-ld删除dead code
2016-05-09 17:18 619[url] https://gcc.gnu.org/ml/gc ... -
python 修饰器
2016-02-05 15:11 382def wrapper1(function): ... -
ubuntu 14.04 install e431 wifi driver
2016-01-25 20:59 419引用 sudo apt-get install linu ... -
git
2016-01-07 12:01 413http://finalshares.cn/attachmen ... -
嵌入式中使用gdb
2016-01-06 17:38 3639编译 For gdb: /path/to/gdb-sr ... -
linux change boot image
2016-01-02 00:55 5111. change grub2 引用vim /etc/defa ... -
binwalk --dd
2015-12-28 21:51 1364http://www.devttys0.com/2012/12 ... -
embeded LD_PRELOAD
2015-12-28 00:17 518引用 eve@eve:~/squashfs-root$ sud ... -
hardware hacking
2015-12-27 01:32 662For video stuff: https://www.yo ... -
ubuntu support kindle
2015-12-20 23:13 337引用apt-get install mtpfs -
linux 备份系统
2015-12-05 22:22 393引用备份 dd if=/dev/sda > myimag ... -
[译]root权限运行vlc
2015-11-30 22:19 1278原文地址:http://www.blackmoreops.co ... -
【转】关闭TCP Timestamps来节省一点带宽
2015-10-15 23:29 1586http://highscalability.com/blog ... -
[转]Terminal escape sequences – the new XSS for Linux sysadmins
2015-09-25 23:58 407https://ma.ttias.be/terminal-es ... -
ipython basic
2015-09-25 11:31 429Introspection引用 Using a questio ... -
static in C
2015-09-22 11:35 286jason@ubuntu:~/test$ cat a.c ... -
lxc重命名容器名
2015-09-20 00:25 778lxc-ls 使用文件夹名作为容器名。所以可以更改文件夹名称来 ... -
lxc更新apt源
2015-09-18 11:49 726最近一直在使用lxc创建容器,每次创建一个容器都需要把apt源 ... -
wireshark:Couldn't run /usr/bin/dumpcap in child process: Permission denied
2015-09-11 10:26 3236When start wireshark, I met an ... -
[转]调试python内存泄漏
2015-09-09 00:48 332http://chase-seibert.github.io/ ...
相关推荐
nginx config reverse proxy for windows.pdf
Run an NGINX reverse proxy with SSL in front of a specified port. positional arguments: CMD 'up' or 'down' flag arguments: -h, --help show this help message and exit -n, --name NAME Docker cont
# description: nginx is a HTTP and reverse proxy server # ### BEGIN INIT INFO # Provides: nginx # Required-Start: $local_fs $remote_fs $network # Required-Stop: $local_fs $remote_fs $network # Default...
nginx 反向代理官方文档: NGINX REVERSE PROXY 当在一台主机上部署了多个不同的web服务器,并且需要能在80端口同时访问这些web服务器时,可以使用 nginx 的反向代理功能: 用 nginx 在80端口监听所有请求,并依据转发...
快速开始docker run \ -ti \ --rm \ -name nginx-fpm-reverse-proxy \ -v ${pwd}:/opt/kimai \ -p 8001:80 \tobybatch/nginx-fpm-reverse-proxy建造没有自定义构建时间: docker build .环境变量PORT=80 Nginx服务器...
ecs-nginx-proxy:AWS ECS的反向代理。 让您按子域寻址Docker容器
containerized_nginx_reverse_proxy Nginx和应用程序都在Docker容器中的反向代理演示
This book is about NGINX the web server, reverse proxy, load balancer, and HTTP cache. Part I will focus mostly on the load-balancing aspect and the advanced features around load balancing, as well ...
重要的每当您第一次运行时,都必须重新加载nginx配置文件。 可以通过键入以下命令来... Nginx公开了80个(默认)和8069个端口(在dockerfile文件中指定) 在docker-compose文件中,odoo_proxy(nginx)发布8069端口。
问题 在之前的分享的跨域资源共享的文章中,有提到要注意跨域时,如果要发送Cookie,Access-Control-Allow-Origin就不能设为*,必须指定明确的、与请求网页...反向代理(Reverse Proxy)方式是指以代理服务器来接受In
反向代理 我的Ubuntu服务器上使用的NGINX反向代理。
docker-nginx-reverse-proxy-with-tests 展示如何使用 WireMock 为 dockerized NGINX 实例编写自动化测试的简单项目。 有关更多信息,请参阅我的 环境设置 要在本地运行运行... ./buildRunAndTest.sh ##图表
Nginx与Apache反向代理配置生成器 该脚本根据您传递给它的参数生成Nginx vhost配置。 .vhost文件与使用Nginx作为Apache的反向代理兼容。 随时根据您的需求进行调整。 它还会在/ var / log / nginx / vhosts / ...
because of its capabilities as a load balancer and reverse proxy server for HTTP and other network protocols. The 2019 edition of this popular cookbook provides more than 80 practical recipes to help ...
Nginx作为Docker容器的反向代理 关于 该存储库是如何使用NGINX Docker容器作为反向代理的示例,该代理是在其他Dockers容器中运行的另一个应用程序的。 什么是反向代理 来自NGINX页面的定义: 代理服务器是介于中间...
nginx-反向代理在 unbuntu/debian 服务器中设置 nginx 反向代理站点的 ansible 角色。要求没有任何角色变量查看defaults/main.yml依赖关系没有任何执照GPLv3
镜像站点,并输出,用于替代nginx的反向代理 已经实现 v1 全站的反代 v1 header跟随跳转 v1 cookies的基本适配 计划中 缓存的建立更新、删除 cookies和session的同步等功能的实现 ip地址的穿透 简单的字符串替换等 ...
nginx反向代理生成器 为子域和地址映射生成Nginx反向代理 CSV范例: a.xyz.com,172.16.0.1:8000 b.xyz.com,172.16.0.1:8001 b.xyz.com,172.16.0.2:8001 注意:这不使用熊猫或其他任何东西,因此请勿放入标头...
我们米扑科技的业务遍布全球,有时国外的客户无法访问我们搭建在国内的服务,这就要求我们...nginx 反向代理官方文档: NGINX REVERSE PROXY 当在一台主机上部署了多个不同的web服务器,并且需要能在80和443端口同时访问
Nginx的反向代理的Apache2