সমস্যা আছে nginx
। এটি ক্লায়েন্ট ডাউনলোড শেষ হওয়ার আগে সংযোগ বন্ধ করে দেয়। এটা দেখতে অনেকটা:
$ wget -O /dev/null http://www.site.com/images/theme/front/clean.jpg
--2012-07-11 21:37:03-- http://www.site.com/images/theme/front/clean.jpg
Resolving www.site.com (www.site.com)... 123.234.123.234
Connecting to www.site.com (www.site.com)|123.234.123.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 90707 (89K) [image/jpeg]
Saving to: `/dev/null'
26% [===============> ] 24,291 --.-K/s in 8.7s
2012-07-11 21:37:12 (2.74 KB/s) - Connection closed at byte 24291. Retrying.
--2012-07-11 21:37:13-- (try: 2) http://www.site.com/images/theme/front/clean.jpg
Connecting to www.site.com (www.site.com)|123.234.123.234|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 90707 (89K), 66416 (65K) remaining [image/jpeg]
Saving to: `/dev/null'
53% [+++++++++++++++============> ] 48,555 --.-K/s in 8.7s
2012-07-11 21:37:23 (2.74 KB/s) - Connection closed at byte 48555. Retrying.
--2012-07-11 21:37:25-- (try: 3) http://www.site.com/images/theme/front/clean.jpg
Connecting to www.site.com (www.site.com)|123.234.123.234|:80... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 90707 (89K), 42152 (41K) remaining [image/jpeg]
Saving to: `/dev/null'
100%[+++++++++++++++++++++++++++========>] 90,707 --.-K/s in 0.1s
2012-07-11 21:37:25 (311 KB/s) - `/dev/null' saved [90707/90707]
ছোট ইমেজ সহ একই সময়ে সমস্ত ঠিক আছে:
$ wget -O /dev/null http://www.site.com/images/theme/front/grease.jpg
--2012-07-11 21:41:28-- http://www.site.com/images/theme/front/grease.jpg
Resolving www.site.com (www.site.com)... 123.234.123.234
Connecting to www.site.com (www.site.com)|123.234.123.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21404 (21K) [image/jpeg]
Saving to: `/dev/null'
100%[====================================>] 21,404 --.-K/s in 0.07s
2012-07-11 21:41:29 (316 KB/s) - `/dev/null' saved [21404/21404]
এই কারণেই এই ছবিটি ব্রাউজারে পুরো আকারে আঁকতে পারে না। আমি এর একমাত্র মাথা দেখতে পাচ্ছি।
এনগিনেক্স ফ্রন্ট-এন্ড এবং অ্যাপাচি ব্যাক-এন্ড হিসাবে কনফিগার করা হয়েছে। অ্যাপাচে সরাসরি লিঙ্কটি ভাল কাজ করে, তাই এনজিনেক্সে সমস্যা আছে। আমি কি সঠিক?
nginx কনফিগারেশন:
user satellite;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
sendfile on;
keepalive_timeout 0;
tcp_nodelay on;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
client_max_body_size 100m;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server {
listen 123.234.123.234:80;
server_name site.com www.site.com;
location ~* ^/(admin/|dump/|webmail/|myadmin/|webim/) {
proxy_pass http://123.234.123.234:8080;
proxy_redirect http://site.com: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 / {
proxy_pass http://123.234.123.234:8080;
proxy_redirect http://site.com: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;
proxy_cache ino;
proxy_cache_valid 12h;
proxy_hide_header "Set-Cookie";
proxy_ignore_headers "Cache-Control" "Expires";
}
location ~* ^.+\.(jpg|swf|flv|ico|txt|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
access_log /home/satellite/logs/site.com.nginx.access.log;
error_page 404 = @fallback;
if ( $host ~* ^((.*).site.com)$ ) {
set $proot /home/satellite/www/$1;
break;
}
if ( $host = "www.site.com" ) {
break;
}
if ( $host = "site.com" ) {
break;
}
root /home/satellite/www/site.com;
}
location @fallback {
proxy_pass http://123.234.123.234: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;
}
}
এই সমস্যাটি সমাধান করার জন্য আমার কোথায় খনন করা উচিত?
sendfile
?