Да, меня интересует причина проблемы, чтобы в последствии больше не наступать на те же грабли.
Предоставляю доп. информацию:
nginx version: nginx/1.4.3
/ect/nginx/nginx.conf
Скрытый текст |
---|
user bitrix;worker_processes 8; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; worker_rlimit_nofile 10240;
events { use epoll; worker_connections 10240; }
http {
include /etc/nginx/mime.types; default_type application/force-download; server_names_hash_bucket_size 128;
# Description of supported access log formats log_format main'$remote_addr - $remote_user [$time_local - upstream_response_time] $status "$request" $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
log_format common '$remote_addr - - [$time_local - $upstream_response_time] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" $msec';
log_format debug '$upstream_response_time,"$time_local","$remote_addr","$request",$status,$body_bytes_sent';
# Disable request logging in nginx by default #access_log /var/log/nginx/access.log common; access_logoff;
sendfileon; tcp_nopushon; tcp_nodelayon;
client_max_body_size1024m; client_body_buffer_size4m;
# Parameters for back-end request proxy proxy_connect_timeout300; proxy_send_timeout300; proxy_read_timeout300; proxy_buffer_size64k; proxy_buffers8 256k; proxy_busy_buffers_size256k; proxy_temp_file_write_size10m;
# Assign default error handlers error_page 500 502 503 504 /500.html; error_page 404 = /404.html;
# Content compression parameters gzipon; gzip_proxiedany; gzip_staticon; gzip_http_version1.0; gzip_typesapplication/x-javascript text/css;
add_header "X-Content-Type-Options" "nosniff";
# Set nginx-push-stream-module common parameters include bx/conf/im_settings.conf;
# Set default website include bx/site_enabled/*.conf;
# Set additional websites include bx/site_ext_enabled/*.conf; } |
/etc/nginx/bx/conf/bitrix.conf
Скрытый текст |
---|
# Assign error handler include bx/conf/errors.conf;
# Include im subscrider handlers include bx/conf/im_subscrider.conf;
# Add / to request for dav services location ~ ^(/extranet/docs|/docs|/workgroups|/company/profile|/bitrix/tools|/company/personal/user|/extranet/contacts/personal|/extranet/workgroups|/mobile/webdav) { include bx/conf/security.conf;
set $addslash ""; if (-d $request_filename) { set $addslash "${addslash}Y"; } if ($is_args != '?') { set $addslash "${addslash}Y"; } if ($addslash = "YY" ) { proxy_pass $proxyserver$uri/; }
proxy_pass $proxyserver; }
# dav service processing location ~ ^(/extranet/docs|/docs|/workgroups|/company/profile|/bitrix/tools|/company/personal/user|/extranet/contacts/personal|/extranet/workgroups|/mobile/webdav).*/$ { include bx/conf/security.conf; proxy_pass $proxyserver; }
# HTML cache location for calls without kernel location ~ ^(/bitrix/html_pages) { index index@.html; include bx/conf/security.conf;
if (!-f $request_filename) { rewrite ^/bitrix/html_pages(.*)/index@.html$ $1/ break; rewrite ^/bitrix/html_pages(.*)/index@(.*)\.html$ $1/?$2 break; rewrite ^/bitrix/html_pages(.*)@.html$ $1.php break; rewrite ^/bitrix/html_pages(.*)@(.*)\.html$ $1.php?$2 break; proxy_pass $proxyserver; } }
# php file processing location ~ \.php$ { include bx/conf/security.conf; if ($request_method = POST ) { break; proxy_pass $proxyserver; }
# If session is not set and HTML cache is enabled, try cached file first set $usecache ""; if ($http_cookie !~ "PHPSESSID=" ) { set $usecache "Y"; } if (-f "$docroot/bitrix/html_pages/.enabled") { set $usecache "${usecache}Y"; } if ($usecache = "YY" ) { rewrite ^(.*)\.php$ /bitrix/html_pages$1@$args.html? last; }
proxy_pass $proxyserver; }
# Dynamic pages location ~ /$ { include bx/conf/security.conf; if ($request_method = POST ) { break; proxy_pass $proxyserver; }
# If session is not set and HTML cache is enabled, try cached file first set $usecache ""; if ($http_cookie !~ "PHPSESSID=" ) { set $usecache "Y"; } if (-f "$docroot/bitrix/html_pages/.enabled") { set $usecache "${usecache}Y"; } if ($usecache = "YY" ) { rewrite ^(.*)/$ /bitrix/html_pages$1/index@$args.html? last; }
proxy_pass $proxyserver; }
# Deny cache access to anyone except for merged CSS files and JS files location ^~ /bitrix/cache { deny all; } location ^~ /bitrix/cache/css/ { location ~* ^.+.(css)$ { expires 30d; error_page 404 /404.html; } location ~* .*$ { deny all; } }
location ^~ /bitrix/cache/js/ { location ~* ^.+.(js)$ { expires 30d; error_page 404 /404.html; } location ~* .*$ { deny all; } }
# Excange and Outlook location ~ ^/bitrix/tools/ws_.*/_vti_bin/.*\.asmx$ { proxy_pass $proxyserver; }
# Deny external access to critical areas location ~ /\.ht { deny all; } location ~ /\.hg { deny all; } location ~ /.svn/ { deny all; } location ~ /.git/ { deny all; } location ^~ /bitrix/modules { deny all; } location ^~ /bitrix/local_cache { deny all; } location ^~ /bitrix/stack_cache { deny all; } location ^~ /bitrix/managed_cache { deny all; } location ^~ /bitrix/php_interface { deny all; } location ^~ /upload/support/not_image { internal; } location ~* /upload/1c_(.*)/(.*) { deny all; }
# Groupdav location ^~ /bitrix/groupdav.php { proxy_pass $proxyserver; }
# Static content location ^~ /upload { expires 30d; error_page 404 /404.html; } location ^~ /bitrix/images { expires 30d; error_page 404 /404.html; } location ^~ /bitrix/tmp { expires 30d; error_page 404 /404.html; }
# Use nginx to return static content from s3 cloud storage location ^~ /upload/bx_cloud_upload/ { location ~ ^/upload/bx_cloud_upload/(http[s]?)\.([^/:]+)\.(s3|s3-us-west-1|s3-eu-west-1|s3-ap-southeast-1|s3-ap-northeast-1)\.amazonaws\.com/(.+)$ { internal; resolver 8.8.8.8; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Server $host; #proxy_max_temp_file_size 0; proxy_pass $1://$2.$3.amazonaws.com/$4; } location ~* .*$ { deny all; } }
# Apache server status page location ^~ /server-status { proxy_pass $proxyserver; }
# Nginx server status page location ^~ /nginx-status { stub_status on; allow 127.0.0.0/24; deny all; }
# Main location location / { expires 15d; include bx/conf/security.conf; # dav processing if ($request_method ~ ^(PROPFIND|OPTIONS|COPY|MOVE|PROPPATCH|MKCOL|LOCK|UNLOCK|PUT|REPORT|SEARCH|MKCALENDAR)$) { proxy_pass $proxyserver; }
# Error page for static content if ($request_filename ~* \.(css|js|gif|png|jpg|jpeg|ico)$) { error_page 404 /404.html; break; } }
# Bitrix setup script location ^~ ^(/bitrixsetup\.php)$ { proxy_pass $proxyserver; proxy_buffering off; } |
Заголовки HTTP запроса и ответа
Скрытый текст |
---|
Remote Address:192.168.7.238:80 Request URL:http://192.168.7.238/upload.php Request Method:POST Status Code:405 Not Allowed Request Headersview source Accept:*/* Accept-Encoding:gzip,deflate,lzma Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Connection:keep-alive Content-Length:667516 Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryG9FIzWmdQAls1WVU Cookie:authautologin=R7ebDMB9t2SJ4PJSLeozpy0YsyyS1OCL; __utma=121056456.722613466.1412690277.1415281578.1415284425.55; __utmz=121056456.1412690277.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) Host:192.168.7.238 Origin:http://192.168.7.238 Referer:http://192.168.7.238/ User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 OPR/25.0.1614.68 X-Requested-With:XMLHttpRequest Request Payload ------WebKitFormBoundaryG9FIzWmdQAls1WVU Content-Disposition: form-data; name="myfile[]"; filename="(1).png" Content-Type: image/png
------WebKitFormBoundaryG9FIzWmdQAls1WVU Content-Disposition: form-data; name="myfile[]"; filename="(2).png" Content-Type: image/png
------WebKitFormBoundaryG9FIzWmdQAls1WVU-- Response Headersview source Connection:keep-alive Content-Length:574 Content-Type:text/html Date:Sat, 08 Nov 2014 12:18:38 GMT Server:nginx/1.4.3 |