1

Hi I am in very confusing state now. I have configured Nginx 1.6 on Centos 6 for serving only Code (js, css, html) pages all other images coming and calls happened through load balancer.

My problem is when I load the page on web browser the first time it will take time and then i refreshed the page 3 to 4 times the images/words are breaking such as akki shown as __akki__ how do i know where its cached and how do i solve this problem my configuration as shown below

user  nginx;
worker_processes  12;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
access_log  /var/log/nginx/access.log  main;
sendfile        on;
    tcp_nopush     on;

    proxy_buffers 30 32k;
    proxy_busy_buffers_size 64k;
keepalive_timeout  65;
gzip  on;
    gzip_comp_level 6;
    gzip_vary on;
    gzip_min_length  1024;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/x-javascript te$
    gzip_buffers 16 8k;
open_file_cache max=10000 inactive=30s;
    open_file_cache_valid 60s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on; 

    include /etc/nginx/conf.d/*.conf;
}

and My default.conf is as below

server {
    listen       80;
    server_name  localhost;
location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }
error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

Please correct me where I am going wrong

2
  • You need to look at and show the response (headers and body) when 'the images/words are breaking'.
    – AD7six
    Jan 30, 2015 at 7:06
  • Some of the rest call giving 404 then the images appeared as break
    – Akki
    Jan 30, 2015 at 8:57

0

You must log in to answer this question.

Browse other questions tagged .