Dec 18, 2017
92 Views

Cấu hình proxy nodejs trên nginx

Written by

Add nginx conf

location /cors4all/ {
client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_connect_timeout 30s;

proxy_pass http://127.0.0.1:8080/;

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 Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
}

Article Tags:
·
Article Categories:
Code/Web
    http://linholiver.com

    https://linholiver.com/diary/about/