Saturday 15 May 2010

php - Nginx --> Upload file = Error (need rewrite) -



php - Nginx --> Upload file = Error (need rewrite) -

i'm using xenforo , there little problem - can't upload files /var/www/internal_data/attachments/0;

it's chmod'ed 0777'. don't know, tried utilize rewrite, still i'm getting upload error.

here default file of nginx configuration:

server { hear 80; hear [::]:80 default ipv6only=on; server_name domain www.domain.com; root /var/www; index index.html index.htm index.php; location / { try_files $uri $uri/ =404; } error_page 403 404 405 /40x.html; location /40x.html { root /somepath; internal; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /somepath; internal; } location ~ \.php$ { root /var/www; index index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } } client_max_body_size 50m; #post urln location /var/www/ { # pass altered request body location upload_pass @after_upload; # store files directory upload_store /var/www/internal_data/attachments/0; # allow uploaded files read user upload_store_access user:rw; # set specified fields in request body upload_set_form_field $upload_field_name.name “$upload_file_name”; upload_set_form_field $upload_field_name.content_type “$upload_content_type”; upload_set_form_field $upload_field_name.path “$upload_tmp_path”; # inform backend hash , size of file upload_aggregate_form_field “$upload_field_name.md5” “$upload_file_md5”; upload_aggregate_form_field “$upload_field_name.size” “$upload_file_size”; #upload_pass_form_field “some_hidden_field_i_care_about”; upload_cleanup 400 404 499 500-505; } location / { root /var/www; } location @after_upload { proxy_pass http://127.0.0.1:8888; } } }

what's wrong there? answers.

php file-upload nginx helpers

No comments:

Post a Comment