node.js - Config nginx with nodejs, don't work with upload file POST request? -
i trying config nginx nodejs ( sails.js framework ). nginx hear requests on port 80 , pass 8080. request work fine ( post ), except upload file post request.
below nginx config file :
events { worker_connections 768; # multi_accept on; } http { ## # basic settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off upstream node { # 1 failed response take server out of circulation 20 seconds. server localhost:8080 fail_timeout=20s; keepalive 512; } server { hear 80 default_server; hear 8191; hear 443 ssl; ssl on; ssl_certificate /home/ubuntu/app/cert.pem; ssl_certificate_key /home/ubuntu/app/key.pem; server_name localhost; location / { proxy_pass https://localhost:8080; proxy_http_version 1.1; proxy_set_header upgrade $http_upgrade; proxy_set_header connection 'upgrade'; proxy_set_header host $host; proxy_cache_bypass $http_upgrade; # define buffers, necessary proper communication prevent 502s proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; } } # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # logging settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # gzip settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; ## # nginx-naxsi config ## # uncomment if installed nginx-naxsi ## #include /etc/nginx/naxsi_core.rules; ## # nginx-passenger config ## # uncomment if installed nginx-passenger ## #passenger_root /usr; #passenger_ruby /usr/bin/ruby; ## # virtual host configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; }
have tried uncommenting these lines?
#passenger_root /usr; #passenger_ruby /usr/bin/ruby; node.js nginx sails.js
No comments:
Post a Comment