помогиче чем смогите :) upload_module+nginx 0.7.61
Maxim
makm at km.ru
Fri Nov 13 19:01:52 MSK 2009
Всем привет
Обсосал уже все поисковики. :)
С Валерой общался. Толку нету... Ситуация вот такая:
Nginx из портов версия 0.7.61 freebsd 7.0
В корне папки www сервера
Index.php -отправщик
Папка UPLOAD - в ней index.php -приемник)
После отправки файлов пишет 404 :-(
Далее - такая картина в логах
2009/11/13 19:49:04 [notice] 778#0: start worker processes
2009/11/13 19:49:04 [notice] 778#0: start worker process 779
2009/11/13 19:50:23 [info] 779#0: *1 started uploading file "httop.swf" to
"/tmp/0000740748" (field "file1", content type
"application/x-shockwave-flash"), client: 192.168.1.10, server:
superfolder.ru, request: "POST /upload HTTP/1.1", host: "superfolder.ru",
referrer: "http://superfolder.ru/"
2009/11/13 19:50:23 [info] 779#0: *1 finished uploading file "httop.swf" to
"/tmp/0000740748", client: 192.168.1.10, server: superfolder.ru, request:
"POST /upload HTTP/1.1", host: "superfolder.ru", referrer:
"http://superfolder.ru/"
2009/11/13 19:50:23 [error] 779#0: *1
"/usr/local/etc/nginx/html/upload/index.html" is not found (2: No such file
or directory), client: 192.168.1.10, server: superfolder.ru, request: "GET
/upload/ HTTP/1.1", host: "superfolder.ru", referrer:
"http://superfolder.ru/"
Т.е файлы грузятся и все ок, почему он не проксируется ?
Хотя апач пишет :
127.0.0.1 - - [13/Nov/2009:19:50:23 +0300] "POST /upload HTTP/1.0" 301 237
"http://superfolder.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru;
rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 WebMoney Advisor"
Конфиги такие
server {
listen 192.168.1.8:80;
server_name superfolder.ru;
location /upload {
upload_pass @test;
upload_store /tmp;
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";
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 "^submit$|^description$";
upload_cleanup 400 404 499 500-505;
}
location @test {
proxy_pass http://localhost:8080;
}
location / {
proxy_pass http://localhost:8080;
proxy_redirect http://superfolder.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location ~*
^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
root /home/web/data/www/superfolder.ru;
access_log
/home/httpd-logs/superfolder.ru.access.log;
error_page 404 = @fallback;
}
location @fallback {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
}
У апача так
NameVirtualHost 192.168.1.8:8080
<VirtualHost localhost:8080>
ServerName superfolder.ru
DocumentRoot /home/web/data/www/superfolder.ru
SuexecUserGroup web web
CustomLog /home/httpd-logs/superfolder.ru.access.log combined
ErrorLog /home/httpd-logs/superfolder.ru.error.log
ServerAlias www.superfolder.ru
ServerAdmin webmaster at superfolder.ru
#Alias /upload /home/web/data/www/superfolder.ru/upload
php_admin_value open_basedir "/home/web/data:."
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f
webmaster at superfolder.ru"
php_admin_value upload_tmp_dir "/home/web/data/mod-tmp"
php_admin_value session.save_path "/home/web/data/mod-tmp"
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php
</VirtualHost>
Спасибо!
More information about the nginx-ru
mailing list