Node.js Nginx POST request -
i have node.js server express running on same machine nginx installed. nginx code in sites-enabled:
upstream project { server 192.168.0.102:3100; } server { listen 80; location / { proxy_pass http://project; } } with config, when type domain on public computer, first page of website shows up, thats okay. webpage form should able upload data server, , when press upload in website, nothing happens. sudo-code:
app.get("/", function(request,response){ //code send html page. part runs fine. }); app.post("/package/upload", function(request,response){ //code read request.body , request.files , save uploaded file server. //nothing happens when try upload through normal xmlhttp object in website. }); i'm been working on servers time, first time using nginx server optimization , load-balancing. can me i'm missing?
(i can't comment, not enough rep)
it looks you've setup proxy_pass on /. have tried defining post location /package/upload , corresponding proxy_pass?
what see when @ network panel in browsers developer tools when try upload? http status codes ton when debugging.
Comments
Post a Comment