upstream myweb {
server127.0.0.1:5000;
}
server {
listen80;
server_name _;
location/{
proxy_pass http://myweb;
#Proxy Settings
proxy_redirect off;
proxy_hide_header Vary;
proxy_set_header Accept-Encoding '';
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_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_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_max_temp_file_size0;
proxy_connect_timeout300;
proxy_send_timeout900;
proxy_read_timeout900;
proxy_buffer_size 32k;
proxy_buffers464k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
expires 5m;
}
location~ /\.ht {
deny all;
}
}
#server {
# listen443;
# server_name _;
# ssl on; #开启ssl
# ssl_certificate ../ssl/server.crt; #服务的证书
# ssl_certificate_key ../ssl/server.key; #服务端key
# ssl_session_timeout 5m; #session超时时间
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #允许SSL协议
# ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA; #加密算法
# ssl_prefer_server_ciphers on; #启动加密算法
# location/{
# proxy_pass http://myweb;
# #Proxy Settings
# proxy_redirect off;
# proxy_hide_header Vary;
# proxy_set_header Accept-Encoding '';
# proxy_set_header Referer $http_referer;
# proxy_set_header Cookie $http_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_set_header X-Forwarded-Proto $scheme;
# proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
# proxy_max_temp_file_size0;
# proxy_connect_timeout300;
# proxy_send_timeout900;
# proxy_read_timeout900;
# proxy_buffer_size 32k;
# proxy_buffers464k;
# proxy_busy_buffers_size 128k;
# proxy_temp_file_write_size 128k;
# expires 5m;
# }
# location~ /\.ht {
# deny all;
# }
#}