Nginx服务配置
来源:互联网 发布:oracle sql if else 编辑:程序博客网 时间:2024/06/14 13:06
本人的Nginx服务器的配置,做一下备份供以后参考
user nginx nginx;worker_processes auto;worker_rlimit_nofile 100000;events { use epoll; multi_accept on; worker_connections 1024 ;}http { server_tokens off; include mime.types; default_type application/octet-stream; log_format main '$server_port $host $http_host $http_cookie $remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"' '$upstream_addr $request_time $upstream_response_time'; # access_log /rcsinx/logs/access.log main; access_log off; error_log /rcsinx/logs/error.log crit; charset utf-8; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; keepalive_requests 8192; reset_timedout_connection on; gzip_comp_level 2; gzip_min_length 1k; gzip_disable "MSIE [1-6]."; client_max_body_size 50m; upstream rcs-manage { ip_hash; server 172.30.5.53:8080 weight=1; server 172.30.5.54:8080 weight=1; } upstream rcs-remote { ip_hash; server 172.30.5.57:8080 weight=1; server 172.30.5.58:8080 weight=1; server 172.30.5.59:8080 weight=1; } upstream fastdfs_tracker { ip_hash; server 172.30.5.55:8000 weight=1 max_fails=2 fail_timeout=30s; server 172.30.5.56:8000 weight=1 max_fails=2 fail_timeout=30s; } server { listen 80; server_name 172.13.3.65 127.0.0.1 172.30.5.51 122.229.31.55; location ~ ^/rcs-manage/static/{ root /rcsinxStatic; expires 30d; access_log off; proxy_redirect off; } # location ~ ^/*.*/WEB-INF* { # # rewrite ^/(.*)$ http://$server_name:80/rcs-manage last; break; # deny all; # access_log off; #} location /rcs-manage { proxy_redirect off; proxy_pass http://rcs-manage/rcs-manage; proxy_set_header Host $host:8090; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 1000; proxy_read_timeout 1000; proxy_send_timeout 1000; } location /rcs-remote/ { proxy_redirect off; proxy_pass http://rcs-remote/rcs-remote/; proxy_set_header Host $host:8090; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 1000; proxy_read_timeout 1000; proxy_send_timeout 1000; } location /fastdfs { root html; index index.html index.htm; proxy_pass http://fastdfs_tracker/; proxy_set_header Host $http_host; proxy_set_header Cookie $http_cookie; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; client_max_body_size 100m; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }}
阅读全文
0 0
- nginx配置https服务
- nginx 多服务配置
- nginx 配置upload服务
- 配置nginx服务
- nginx配置点播服务
- nginx服务配置
- Nginx 配置https服务
- Nginx服务配置
- nginx服务配置信息
- nginx配置起服务
- nginx配置反向代理服务
- nginx http服务搭建配置
- Nginx服务的基本配置
- Nginx配置静态文件服务
- nginx配置nodejs服务二级域名
- Nginx服务的基本配置
- Nginx安装配置与服务搭建
- Nginx安装配置与服务搭建
- 第三周项目3—求集合并集
- HttpClient远程post请求接口工具类(网上查找部分修改,不算严格原创)
- Git常用命令
- 产品需求文档五分钟轻松搞定!这可能史上最全PRD文档模板
- iOS 11 正式版发布,都有哪些新内容?
- Nginx服务配置
- hdu 4344 大数分解
- 流程图样例
- codeblocks安装后找不到编译器的问题
- MyBatis配置
- MySQL server has gone away 问题的解决方法
- 3.1 Unicode ----Jvm是unicode编码及验证
- 图像处理理解
- Struts中模型驱动与属性驱动共同使用可能会遇到的问题