1、参考
2、nignx配置
server {
listen 8088;
#listen 443 ssl;
#ssl_certificate 7249692_tlh.kikyo.com.pem;
#ssl_certificate_key 7249692_tlh.kikyo.com.key;
#ssl_protocols TLSv1.1 TLSv1.2;
#ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
#ssl_prefer_server_ciphers on;
#ssl_session_cache shared:SSL:10m;
#ssl_session_timeout 10m;
client_max_body_size 5000m;
sendfile on; #开启上传文件加速
client_max_body_size 5000m; #上传最大5000MB
client_body_buffer_size 500m; #上传最大缓冲区500MB
keepalive_timeout 600; #超时600s
send_timeout 600;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
#server_name tlh.kikyo.com;
index index.php index.html index.htm default.php default.htm default.html;
root /data/youmai;
error_page 405 =200 http://$host$request_uri;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,X-Data-Type,X-Requested-With,X-Data-Type,X-Auth-Token,token';
if ( $request_method = 'OPTIONS' ) {
return 200;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if (!-e $request_filename){
proxy_pass http://127.0.0.1:9988;
}
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 REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
}
}
标签:set,ssl,header,nginx,add,proxy,timeout,linux,上传
From: https://www.cnblogs.com/kikyoqiang/p/16878961.html