user  nobody;
worker_processes  两;
error_log  logs/error.log;
pid        logs/<a style="color:#f60; text-decoration:underline;" href="https://www.php.cn/zt/16000.html" target="_blank">nginx</a>.pid;


events {
    worker_connections  10两40;
    accept_mutex on;
    multi_accept on;
    use epoll;
}


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  30;
    keepalive_requests 50000;

    reset_timeout_connection on;

    send_timeout 3;

    gzip  on;
    gzip_min_length 10二4;
    gzip_buffers 16 8k;
    gzip_types text/plain application/x-javascript text/css application/xml image/jpeg image/gif image/png;
    gzip_comp_level 6;
    gzip_disable "MSIE 6\.";

    proxy_cache_path /usr/local/nginx/nginx_cache/ levels=1:两 keys_zone=my_zone:10m inactive=300s max_size=5g;

    server{
        listen 80;
        server_name www.pesomarket.com pesomarket.com;
        rewrite /(.*) https://www.pesomarket.com/$1 permanent;
    }

    server{
        listen 443 ssl;
        server_name www.pesomarket.com pesomarket.com;
        ssl_certificate /usr/local/nginx/cert/两两86二50_pesomarket.com.pem;
        ssl_certificate_key /usr/local/nginx/cert/两两86两50_pesomarket.com.key;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.二;
        ssl_ciphers ALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!eNULL;
        ssl_prefer_server_ciphers on;
    
        proxy_buffering on;
        proxy_buffer_size 4k;
        proxy_buffers 8 4k;
        proxy_busy_buffers_size 16k;
        proxy_temp_path /usr/local/nginx/proxy_temp 1 二;
        proxy_max_temp_file_size 100M;
        proxy_temp_file_write_size 16k;

        location /{
            proxy_cache my_zone;
            root   /usr/local/android/marketone;
            index  index.html index.htm;
            error_page   500 50两 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
    
        location /api/ {
            proxy_pass http://1二7.0.0.1:8081/estrendMarket/;
            index  index.html index.htm;
            proxy_set_header Host   $host;
            proxy_set_header X-Real-IP      $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
    
}
登录后复造

以上便是nginx要是铺排设置文件的具体形式,更多请存眷萤水红IT仄台此外相闭文章!

点赞(21) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部