Tengine Cache Server Configuration

Source: Internet
Author: User

  

Official Document http://tengine.taobao.org/

Tengine Master configuration file

Cat/usr/local/nginx/conf/nginx.confuser nobody nobody;worker_processes 8; #error_log/www/nginx/logs/nginx_  Debug.log debug_http;error_log/www/nginx/logs/nginx_error.log error; #error_log/www/nginx/logs/nginx_notice.log     Notice, #error_log/www/nginx/logs/nginx_info.log info;pid/var/run/nginx.pid;worker_rlimit_nofile 102400;events {    Use Epoll; Worker_connections 102400;}    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";  # Log_format for Base_nginx_log log_format base_nginx_log ' $remote _addr- $remote _user [$time _local] $msec "$host $request $status $http _accept_encoding $body _bytes_sen T $http _referer $http _user_agent "$http_cookie $upstream _addr $upstream _response_time $request _time $connection _requests $upstream _cache_status ';    #access_log Logs/access.log Main;    Server_names_hash_bucket_size 512;    Client_header_buffer_size 32k;    Large_client_header_buffers 8 32k;    Client_max_body_size 100m;    Client_body_buffer_size 128k;    Client_body_temp_path/lvm_cache/nginx/client_temp 1 2;    Sendfile on;    Tcp_nopush on;    #keepalive_timeout 0;    Keepalive_timeout 65;    Tcp_nodelay on;    Server_tokens off;    Server_tag Nginx;    Index index.html index.htm index.jsp;    Add_header x-ua-compatible "Ie=emulateie7"; # add_header X-cache ' $upstream _cache_status ';    Open_file_cache max=102400 inactive=20s;    Open_file_cache_valid 30s;    Open_file_cache_min_uses 1;    ####### begin gzip ####### gzip off;    Gzip_min_length 100;    Gzip_buffers 32k;    Gzip_http_version 1.1;    Gzip_proxied any;    Gzip_comp_level 9; Gzip_types text/plain text/css text/xml appliCation/xml text/javascript Application/x-javascript Application/json;    Gzip_vary on;    ####### End gzip ####### ###### #begin proxy ####### proxy_redirect off;    Proxy_connect_timeout 15;    Proxy_send_timeout 60;    Proxy_read_timeout 60;    Proxy_buffer_size 64k;    Proxy_buffers 64k;     Proxy_busy_buffers_size 64k;    Proxy_temp_file_write_size 512k;    Proxy_temp_path/lvm_cache/nginx/proxy_temp;    Proxy_pass_header Set-cookie;    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 http_404;        #fastcgi_next_upstream Error timeout Invalid_header http_500 http_503 http_404;    Proxy_next_upstream Error timeout http_500 http_502 http_503 http_504;    Proxy_cache_use_stale Error timeout http_500 http_502 http_503 http_504 http_404; Proxy_cache_path/lvm_cache/nginx/cache_test Levels=1:2 keys_zone=cache_test:100m inactive=1d max_size=300m;    #gzip on;        # server {Listen 88;        server_name localhost;        #charset Koi8-r;        #access_log Logs/host.access.log Main;            Location/{root HTML;        Index index.html index.htm;        } #error_page 404/404.html;        # REDIRECT Server error pages to the static page/50x.html # Error_page 502 503 504/50x.html;        Location =/50x.html {root html; } # Proxy The PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ {# ProX        Y_pass http://127.0.0.1;        #} # Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ {        # root HTML;        # Fastcgi_pass 127.0.0.1:9000;        # Fastcgi_index index.php;   # Fastcgi_param Script_filename/scripts$fastcgi_script_name;     # include Fastcgi_params; #} # Deny access to. htaccess files, if Apache ' s document Root # concurs with Nginx ' s one # #l        ocation ~/\.ht {# deny all;          #}} server {listen 10.10.10.10:88;        server_name 10.10.10.10;                    Location ^~/nginx_status {stub_status on;            } location ^~/cluster_status {check_status;                        Access_log off;            Allow 10.10.10.10;            Allow 10.10.10.0/28;        Deny all;           }# location ^~/httpcode_status {# show_status_code_count on;##}# location ^~/ttlsa-req-status {#          req_status_show;##} location ~/purge (/.*) {#allow 10.10.10.20;          #deny all;      Proxy_cache_purge cache_test $http _referer$1$is_args$args;  } location ~/purge_test (/.*) {proxy_cache_purge cache_test $http _referer$1$is_args$args;    } Access_log off; } # Another virtual host using mix of ip-, name-, and port-based configuration # #server {# Listen 8    000;    # Listen somename:8080;    # server_name somename alias Another.alias;    # location/{# root HTML;    # index index.html index.htm;    #} #} # HTTPS Server # #server {# listen 443 SSL;    # server_name localhost;    # ssl_certificate Cert.pem;    # Ssl_certificate_key Cert.key;    # Ssl_session_cache shared:ssl:1m;    # ssl_session_timeout 5m; # ssl_ciphers high:!anull:!    MD5;    # ssl_prefer_server_ciphers on;    # location/{# root HTML;    # index index.html index.htm;    #} #} #include/usr/local/nginx/conf/cluster.conf;    include/usr/local/nginx/conf/cluster/*.conf; include/usr/local/nginx/conf/include/*.conf;}

  

Tengine Cache Server Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.