Nginx HTTP反向代理基础配置
#user nobody;
worker_processes 1; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65; upstream apachephp {
server 要代理的ip:要代理的端口;
} server {
listen 8888;
server_name localhost;
root html;
index index.html index.htm index.php;
#charset koi8-r; #access_log logs/host.access.log main; location / {
proxy_pass http://apachephp;
#Proxy Settings
proxy_redirect 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;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size 0;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}
}
Nginx HTTP反向代理基础配置的更多相关文章
- Nginx专题(1):Nginx之反向代理及配置
摘要:本文从Nginx的概念出发,分别从反向代理的概念.优势.配置代码3个方面介绍了Nginx的特性之一反向代理. 文章来源:宜信技术学院 & 宜信支付结算团队技术分享第一期-宜信支付结算八方 ...
- nginx的反向代理和配置
最近有打算研读nginx源代码,看到网上介绍nginx可以作为一个反向代理服务器完成负载均衡.所以搜罗了一些关于反向代理服务器的内容,整理综合. 一 概述 反向代理(Reverse Proxy)方式 ...
- linux下nginx【反向代理】配置【负载均衡】配置
nginx 可以配置多个端口: 1.10088端口 配置反向代理,消除跨域问题. 2.10087端口 配置ip_hash模式的负载均衡,ip_hash可以绕开解决session共享的问题. nginx ...
- Nginx学习笔记(三)--- Nginx实现反向代理和配置负载均衡
1.反向代理 2.Nginx反向代理流程图 3.安装多个tomcat 3.1把tomcat的压缩包传到Linux上 3.2 解压tomcat 3.3 给压缩好的tomcat改个名字用来区分一下 3.4 ...
- 使用Nginx做反向代理的配置
安装Nginx服务之后 修改Nginx配置文件 如下server字段中主要是配置listen监听8080 端口,然后静态文件袋里到8001 后端端口代理到8000 server { listen 8 ...
- Nginx的反向代理的配置
1.linux下的方向代理(前提域名和P已经映射好了的) 在linux中的输入命令:whereis nginx 查看当前nginx的安装目录 显示 nginx: /usr/local/nginx 命令 ...
- nginx反向代理缓存配置
关于nginx的反向代理缓存配置,用的最多的就是CDN公司,目前CDN公司用纯nginx做缓存的已经很少了,基本都用tnginx(阿里的).openresty:但是这两款软件都是基于nignx开发的, ...
- 【netcore基础】CentOS 7.6.1810 搭建.net core 2.1 linux 运行环境 nginx反向代理 supervisor配置自启动
之前写过一篇Ubuntu的环境搭建博客,感觉一些配置大同小异,这里重点记录下 nginx 作为静态 angular 项目文件服务器的配置 参考链接 [netcore基础]ubuntu 16.04 搭建 ...
- 【netcore基础】ubuntu 16.04 搭建.net core 2.1 linux 运行环境 nginx反向代理 supervisor配置自启动
今天来整理下 netcore 在 linux(ubuntu) 上的运行环境搭建 对应版本 ubuntu 16.04 .net core 2.1 nginx version: nginx/1.10.3 ...
随机推荐
- iOS ZipArchive文件解压缩
ZipArchive可以用于iOS中文件的解压缩 压缩文件的方法: //将工程中picture添加到左面111.zip压缩文件中 如果崩溃请更换压缩路径 -(void)testZipFile{ //压 ...
- swift - 实现类似今日头条顶部标签和底部内容的动态解决方案
TYPageView TYPageView 类似今日头条 的标签导航解决方案,支持多种样式选择,基于swift3.0,支持文字颜色动态变化,底部选中线的动态变化 配图: 使用方法: let title ...
- VSCode调试.net core 2.0 输出窗口乱码
Q:输出窗口乱码 A:修改.vscode文件夹下,tasks.json文件,具体内容见图
- spring-test-dbunit的配置和使用
1.数据源配置 <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" ...
- php 获取文件加的名称
/*** * 根本平台类型获取文件名 */ function showGetFileName($type,$url){ #判断平台类型 if($type=='android'||$type=='ios ...
- 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Red Hat Enterpris ...
- Android异步处理三:Handler+Looper+MessageQueue深入详解
在<Android异步处理一:使用Thread+Handler实现非UI线程更新UI界面>中,我们讲到使用Thread+Handler的方式来实现界面的更新,其实是在非UI线程发送消息到U ...
- centos7.0 关闭防火墙
1.关闭firewall:systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止fire ...
- 如何在iOS中使用libxml
本文转载至 http://blog.csdn.net/cloudhsu/article/details/8087628 1. 选择xcode工程设定 2. 选择target 3. 选择Summary ...
- Stacks of Flapjacks(栈)
Stacks of Flapjacks Background Stacks and Queues are often considered the bread and butter of data ...