2

http://example.comに Magento ショップがあり、http://example.com/blogで Wordpress ブログを維持したいと考えています。ブログをインストールしましたが、すべて問題ないように見えますが、Wp-Admin にログインすると、css および js ファイルの 404 が表示され、ダッシュボードが非常に見苦しく見えます。私は何か間違いをしていますか?私のnginx設定ファイルを添付しています

##################################################################################
#
#                       example.com
#
##################################################################################
server {
    listen       80;
    server_name  example.com ;
    #charset koi8-r;

        #access_log  /var/log/nginx/access.log;
        error_log  /var/log/nginx/error.log;

    location / {
        root   /usr/share/nginx/html/mebozo-magento.mebozo.com;
        try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
        index  index.php index.html index.htm;
    }
        location /blog {
        root   /usr/share/nginx/html/mebozo-magento.mebozo.com/blog;
        try_files $uri $uri/ /blog/index.php;
        index  index.php index.html index.htm;
        rewrite ^.*/files/(.*) /wp-includes/ms-files.php?file=$2;
        rewrite ^.*/wp-admin(.*) $1wp-admin/;


    }

    location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
        {
        root  /usr/share/nginx/html/mebozo-magento.mebozo.com/blog;
        rewrite ^/.*(/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;

        rewrite ^.*/files/(/.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$/wp-includes/ms-files.php?file=$1 last;

        expires 30d;
        break;
        }

## These locations would be hidden by .htaccess normally

#location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
#expires 1y;
#log_not_found off;
#}

        location ~ .php/ { 
        ## Forward paths like /js/index.php/x.js to relevant handler
        rewrite ^(.*.php)/ $1 last;
    }

################For Foomen Speedster###############
#rewrite ^/minify/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last;
#    rewrite ^/skin/m/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last;

#    location /lib/minify/ {
#        allow all;
#    }


error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

#############gzip###########

        gzip on; # use gzip compression
        gzip_min_length 1100;
        gzip_buffers 4 8k; 
        gzip_proxied any; # enable proxy for the fcgi requests
        gzip_types text/plain text/css application/x-javascript text/javascript application/json; 

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}
    location @handler { ## Magento uses a common front handler
        rewrite / /index.php;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #

    location ~ \.php$ {
        #      if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss
        root           /usr/share/nginx/html/mebozo-magento.mebozo.com;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html/mebozo-magento.mebozo.com$fastcgi_script_name;
        include        fastcgi_params;
    }

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

1 に答える 1