nginx 反向代理配置

http {
include mime.types;
default_type application/octet-stream;

#access_log logs/access.log main;
access_log off;

sendfile on;
#tcp_nopush on;

keepalive_timeout 2000;
client_max_body_size 500m;
client_header_buffer_size 64k;
large_client_header_buffers 4 256k;
#gzip on;

# upstream ac{
# server 10.26.92.32:8088;
# server 10.26.92.32:8089;
# }


server {
listen 8080;
listen 80;
server_name 51fq.com;
root /usr/share/nginx/html;

ssl_certificate /etc/letsencrypt/live/ac.mymlsoft.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ac.mymlsoft.com/privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;


location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# location ^~/hookservice/ {
proxy_pass http://ac;
proxy_set_header X_forward_for $proxy_add_x_forwarded_for;
}
location ~*smartlife {
proxy_pass http://localhost:8090;
}



#location /nginx_status {
# stub_status on;
# access_log off;
# }

}
}

posted on 2017-02-22 12:37  baxk2001  阅读(150)  评论(0编辑  收藏  举报

导航