Nginx 转发配置
来源:互联网 发布:幻灯片软件免费下载 编辑:程序博客网 时间:2024/06/06 08:35
主要是 静态文件分离了出来
#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;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
client_body_timeout 60000;
client_max_body_size 1024m;
send_timeout 60000;
client_header_buffer_size 16k;
large_client_header_buffers 4 64k;
proxy_headers_hash_bucket_size 1024;
proxy_headers_hash_max_size 4096;
proxy_read_timeout 60000;
proxy_send_timeout 60000;
#charset koi8-r;
#access_log logs/host.access.log main;
# location / {
# root html;
# index index.html index.htm;
# }
location /xxx{
proxy_pass http://127.0.0.1:1608/xxxx;
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 /dddd {
proxy_pass http://127.0.0.1:9302/dddd/;
# 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 ~ .*\.(jpg|png|jpeg|bmp|gif|swf|css|js|txt)$
{
access_log off;
# expires 30d;
root D:/hx/;
if (-f $request_filename) {
expires 30d;
break;
}
}
}
}
- Nginx转发代理配置
- nginx 配置端口转发
- nginx配置转发
- nginx TCP转发配置
- nginx转发websocket配置
- nginx TCP 转发配置
- Nginx 转发配置
- nginx配置url转发
- nginx转发配置
- nginx配置proxy_pass代理转发
- Nginx 配置子域名转发
- nginx 配置转发到tomcat
- Nginx配置proxy_pass 转发问题
- nginx转发方式的配置
- ubuntu配置apache2的nginx的转发
- Nginx配置proxy_pass转发的/路径问题
- nginx静态化文件转发规则配置
- 将nginx配置成url_hash转发方式
- 《利用Python进行数据分析》笔记---第11章金融和经济数据应用
- MyEclipse部署项目到虚拟路径并且更改项目名
- 事件冒泡
- 各种数据类型的范围
- java for循环定时循环
- Nginx 转发配置
- 5.6.24-72.2-log Percona Server 主从延迟
- NYOJ 103-A+B Problem II
- C++模板函数中含有数据类型成员时导致编译错误(显示未知类型)的解决方法
- linux free 解读
- 深入理解Java虚拟机(6)-.Class文件格式(五)
- Java集合---HashSet的源码分析
- PHP 实例
- MYSQL常用内置函数详解说明