Drupal 背景和nginx配置

Drupal 背景和nginx配置,drupal,nginx,background,Drupal,Nginx,Background,我不理解nginx conf的问题,我在nginx中创建了vhost和conf domain.conf,但我注意到,当我将下面的代码放在nginx.conf中时,背景会出现,但当我将其放在domain.conf中时,站点的背景会消失: 在nginx.conf中 location ~ ^/en/ { root "c:/wt-nmp/www/domain"; try_files $uri $uri/ /index.php?u=$1 last; } 这个配置有效,我有

我不理解nginx conf的问题,我在nginx中创建了vhost和conf domain.conf,但我注意到,当我将下面的代码放在nginx.conf中时,背景会出现,但当我将其放在domain.conf中时,站点的背景会消失:

在nginx.conf中

location ~ ^/en/ {
    root "c:/wt-nmp/www/domain";
        try_files $uri $uri/ /index.php?u=$1 last;
    }
这个配置有效,我有

background: url(/en/sites/all/themes/le/images/logo.png) 
background: url(/en/sites/all/themes/le/images/logo.png) 
使用主机:localhost/domain

但是在domain.conf中

location /en/ {
        root "c:/wt-nmp/www/domain";
            try_files $uri $uri/ /index.php?u=$1 last;
        }
第一个都不管用,我也没有

background: url(/en/sites/all/themes/le/images/logo.png) 
background: url(/en/sites/all/themes/le/images/logo.png) 
主机:localhost

注意:en是域的子目录

有人能帮我吗

domain.conf:

server {
    listen      127.0.0.1:80;
    server_name     domain.local;
    root    "c:/wt-nmp/www/domain";
    autoindex on;
    index  index.php;
    rewrite     ^ $scheme://localhost/domain/en$request_uri permanent;
    ## Access Restrictions
    allow       127.0.0.1;
    deny        all;

    ## Add more location directives here:

    location ~ \.php$ {
        #try_files $uri =404;
        include     nginx.fastcgi.conf;
        fastcgi_pass    php_farm;
    }

    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    location/en/ {
    root "c:/wt-nmp/www/domain";
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }

}
和nginx.conf在这里:

  worker_processes  1;
events {
    worker_connections  1024;
}
http {
    server_tokens       on;
    sendfile        on;
    tcp_nopush      on;
    tcp_nodelay     on;
    ssi         off;

    #Timeouts
        client_body_timeout 5;
        client_header_timeout   5;
        keepalive_timeout   25 25;
        send_timeout        15s;
    resolver_timeout    3s;

    #Directive sets timeout period for connection with FastCGI-server. It should be noted that this value can't exceed 75 seconds. 
    fastcgi_connect_timeout 5s;

    #Directive sets the amount of time for upstream to wait for a fastcgi process to send data. Change this directive if you have long running fastcgi processes that do not produce output until they have finished processing. If you are seeing an upstream timed out error in the error log, then increase this parameter to something more appropriate. 
    fastcgi_read_timeout    400s;

    #Directive specifies request timeout to the server. The timeout is calculated between two write operations, not for the whole request. If no data have been written during this period then serve closes the connection.
    fastcgi_send_timeout    150s;

    fastcgi_buffers 8 32k;
    fastcgi_buffer_size 32k;
    #fastcgi_busy_buffers_size 256k;
    #fastcgi_temp_file_write_size 256k;

    open_file_cache off;

    #php max upload limit cannot be larger than this       
    client_max_body_size 8m;
        ####client_body_buffer_size  1K;
        client_header_buffer_size 1k;
        large_client_header_buffers 2 1k;   
    types_hash_max_size 2048;

    include nginx.mimetypes.conf;
    default_type text/html;

    ##
    # Logging Settings
    ##
    access_log "c:/wt-nmp/log/nginx_access.log";
    error_log "c:/wt-nmp/log/nginx_error.log" warn; #debug or warn
    log_not_found on;  #enables or disables messages in error_log about files not found on disk. 
    rewrite_log on;

    #Leave this off
    fastcgi_intercept_errors off;

    gzip  off;

    index  index.php index.htm index.html;

    server {
        listen      127.0.0.1:80    default_server;
        #listen     [::1]:80    ipv6only=on;
        server_name  localhost;

        root "c:/wt-nmp/www/";
        autoindex on;

        allow       127.0.0.1;
        #allow      ::1;
        deny        all;

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
           # deny  all;   
        }

        #tools are now served from wt-nmp/include/tools/
        location ~ ^/tools/.*\.php$ {                   
            root "c:/wt-nmp/include";
            try_files $uri =404; 
            include     nginx.fastcgi.conf;
            fastcgi_pass    php_farm;
        }
        location ~ ^/tools/ {
            root "c:/wt-nmp/include";
        }

        location ~ \.php$ {
           # try_files $uri =404; 
               # fastcgi_pass   php_farm;
            fastcgi_pass     127.0.0.1:9000;
            include     nginx.fastcgi.conf;
            }

    }

    include domains.d/*.conf;

    include nginx.phpfarm.conf;
}

感谢

显示完整的服务器块配置完成我将其添加到问题中在此配置中看不到问题第一部分中的任何块。因为我实际删除它是为了进行测试