Code Monkey home page Code Monkey logo

Comments (1)

kitamiq avatar kitamiq commented on July 18, 2024

I spent whole night trying to fix the same issue. Just as @maro584, i gave up on using the default upload_store /tmp/upload 1;, because even though the subdirectories clearly exist and have the correct permissions (ended up with 777), the error.log was telling me (2: No such file or directory). Switching to upload_store /tmp stopped throwing any errors or messages at all, however the files were actually never saving in /tmp/, and trying different locations such as /var/tmp and so on didn't help. I also tried using different users in the nginx.conf's user directive, including my own working user to ensure it's not a permissions/access issue.

Things suddenly started working when I changed the line to upload_store /var/log/nginx/;, which of course is ridiculous and wrong, but it's the place nginx 100% can access, and indeed, the files started uploading. I don't know anything about nginx' inner structure and thus have no idea why it doesn't allow itself not just accessing but "seeing" any directories outside of the working dir paths defined when compiling, maybe it's the default behavior for security reasons, maybe I missed some obscure compilation flag that would allow this.

So, I guess my advice is to implement a temporary solution, save the files into one of the nginx directories and make your backend scripts instantly move them to a better location if you plan to use nginx as a fast local proxy for testing your python/ruby/php webapp, or switch to Apache if you need a production web server, that would save you a lot of time. Honestly, it's depressing how there is little to no online help about such issues in nginx and its modules.

from nginx-upload-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.