Welcome! Log In Create A New Profile

Advanced

Uploading

Posted by ecflyer 
Uploading
July 20, 2015 04:49PM
Using Nginx to replace Apache and hopefully PHP. Added this to nginx.conf for upload capabilities:

<code>
location /upload {
auth_basic "Restricted Upload";
auth_basic_user_file basic.htpasswd;
limit_except POST { deny all; }

client_body_temp_path /tmp/;
client_body_in_file_only on;
client_body_buffer_size 128K;
client_max_body_size 1000M;

proxy_pass_request_headers off;
proxy_set_header X-FILE $request_body_file;
proxy_set_body off;
proxy_redirect off;
proxy_pass http://backend/file;

}
</code>

Restarting nginx versino 1.8 on Ubunto 14.04 gives error host not found in upstream "backend" in /usr/local/nginx/conf/nginx.conf... ?Where do I create directory "backend"? What permissions does it need?

How do I create my basic.htpasswd file? Where do I save it (nginx is located in /local/sbin)?

For POST, what needs to be in my custom headers?

Thanks and sorry for being such a newbie.

E
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready