Nginx HTTP反向代理基础配置
2024-08-30 12:41:29
#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;
}
}
}
最新文章
- 翻唱曲练习:龙珠改主题曲 【Dragon Soul】龙之魂
- Spring中AOP(通知)的使用
- 【poj3422】 Kaka's Matrix Travels
- ASP.NET 5探险(4):如何把ASP.NET 5从beta4升级到beta5
- java中特殊的String类型
- CSS透明度大汇总
- shell脚本替换文件中字符
- ExtJs3带条件的分页查询的实现
- shell调用sqlplus批量执行sql文件
- 【转】IOS 怎么获取外设的广播数据AdvData
- hdu2044java递推
- 通过EL表达式,后台数据传到前台,引号及后面的数据被截断的问题:
- html的特质语义:微格式及其他(重点介绍其中两种)
- Servlet和JSP读书笔记(三)之Cookie
- 3.1. 修改托管对象模型(Core Data 应用程序实践指南)
- 《principles of model checking》中的离散时间马尔科夫链
- C# md5加密方法
- 【做题】SRM701 Div1 Hard - FibonacciStringSum——数学和式&矩阵快速幂
- Swift 学习- 03 -- 基本运算符
- C#.NET常见问题(FAQ)-如何把定义存放类实例的数组