1

Поставил nginx, настроил конфиг, но вот беда картинки отображаются только на домене прописаном в root, а на всех остальных доменах (а у меня их 10 - картинки не отображаются)

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format main  '$remote_addr - $remote_user [$time_local] $status '
    '"$request" $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;
    tcp_nodelay    on;

    server {
        listen       80 default;
        server_name  site.ru www.site.ru;
        # access_log  /var/log/httpd/access.log  main;

        # Main location
        location / {
            proxy_pass         http://127.0.0.1:8080/;
            proxy_redirect     off;
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            client_max_body_size       10m;
            client_body_buffer_size    128k;
            proxy_connect_timeout      90;
            proxy_send_timeout         90;
            proxy_read_timeout         90;
            proxy_buffer_size          4k;
            proxy_buffers              4 32k;
            proxy_busy_buffers_size    64k;
            proxy_temp_file_write_size 64k;
        }

        # Static files location
        location ~*^.+\.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$
        {
            root   /var/www/vhosts/site.ru/httpdocs/;
        }

    }
}