{"action":"created","issue":{"url":"https://api.github.com/repos/tomitrescak/meteor-uploads/issues/40","labels_url":"https://api.github.com/repos/tomitrescak/meteor-uploads/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/tomitrescak/meteor-uploads/issues/40/comments","events_url":"https://api.github.com/repos/tomitrescak/meteor-uploads/issues/40/events","html_url":"https://github.com/tomitrescak/meteor-uploads/issues/40","id":57656417,"number":40,"title":"502 Bad Gateway on Nginx deployment","user":{"login":"conorstrejcek","id":2925090,"avatar_url":"https://avatars.githubusercontent.com/u/2925090?v=3","gravatar_id":"","url":"https://api.github.com/users/conorstrejcek","html_url":"https://github.com/conorstrejcek","followers_url":"https://api.github.com/users/conorstrejcek/followers","following_url":"https://api.github.com/users/conorstrejcek/following{/other_user}","gists_url":"https://api.github.com/users/conorstrejcek/gists{/gist_id}","starred_url":"https://api.github.com/users/conorstrejcek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorstrejcek/subscriptions","organizations_url":"https://api.github.com/users/conorstrejcek/orgs","repos_url":"https://api.github.com/users/conorstrejcek/repos","events_url":"https://api.github.com/users/conorstrejcek/events{/privacy}","received_events_url":"https://api.github.com/users/conorstrejcek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-02-13T21:28:09Z","updated_at":"2015-05-13T02:56:30Z","closed_at":"2015-02-20T13:01:59Z","body":"I have a few meteor apps deployed on subdomains of my Nginx server. Nginx routes these subdomains to the port which each app runs on. I am trying to use meteor-uploads in one of my applications, and I am getting a `502 Bad Gateway` error when I attempt an upload.\r\n\r\nI'm not sure if this is a problem with how I have Nginx set up, or with deployed meteor projects using `meteor-uploads`.\r\n\r\n![Here is a screenshot.](https://cloud.githubusercontent.com/assets/2925090/6195554/c9eca00c-b394-11e4-90b4-c21518901c67.png)\r\n\r\nLet me know if you'd like more information (either about my Nginx configuration, or anything else).\r\n\r\nI am wondering if I might have to set up some special routing for the `/upload` path.\r\n\r\nLooking in the Nginx error logs, I can see `upstream prematurely closed connection while reading response header from upstream`, which might lead me to believe that the application is having problems, rather than Nginx.\r\n"},"comment":{"url":"https://api.github.com/repos/tomitrescak/meteor-uploads/issues/comments/101489328","html_url":"https://github.com/tomitrescak/meteor-uploads/issues/40#issuecomment-101489328","issue_url":"https://api.github.com/repos/tomitrescak/meteor-uploads/issues/40","id":101489328,"user":{"login":"greenwolfe","id":5997696,"avatar_url":"https://avatars.githubusercontent.com/u/5997696?v=3","gravatar_id":"","url":"https://api.github.com/users/greenwolfe","html_url":"https://github.com/greenwolfe","followers_url":"https://api.github.com/users/greenwolfe/followers","following_url":"https://api.github.com/users/greenwolfe/following{/other_user}","gists_url":"https://api.github.com/users/greenwolfe/gists{/gist_id}","starred_url":"https://api.github.com/users/greenwolfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenwolfe/subscriptions","organizations_url":"https://api.github.com/users/greenwolfe/orgs","repos_url":"https://api.github.com/users/greenwolfe/repos","events_url":"https://api.github.com/users/greenwolfe/events{/privacy}","received_events_url":"https://api.github.com/users/greenwolfe/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T02:56:30Z","updated_at":"2015-05-13T02:56:30Z","body":"This thread was very informative, and I now have meteor-uploads working on digital ocean with the upload directories set at /opt/MyApp/.uploads and /opt/MyApp/.uploads/tmp.  As an experiment, I tried using folders in the deploying users home directory (with owner and permissions set properly), but this did not work.  Is the uploads directory restricted to a subfolder of /opt/MyApp in this circumstance?  Are there any security concerns about storing the files here?  Would there be any other advantage to storing the uploaded files elsewhere, or should I be content with the solution as is?\r\n\r\nThanks,\r\n\r\nMatt"}}