wp-admin页面只输出部分html

时间:2012-09-05 15:01:26

标签: wordpress nginx

我尝试将博客从一台服务器上的apache迁移到另一台服务器上的nginx。

首页和文章都很好(使用永久链接)。 wp-login.php很好。但是/ wp-admin只输出部分html,在

之后的部分停止

这是我的nginx配置:

server {
        listen   80; ## listen for ipv4; this line is default and implied
        listen   [::]:80; ## listen for ipv6

        root /home/someblog/www;
        index index.php index.html index.htm;

        #this isn't really example.com ;)
        server_name example.com;

location = /favicon.ico {
                log_not_found off;
                access_log off;
        }

        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }

        location / {
                # This is cool because no php is touched for static content.
                # include the "?$args" part so non-default permalinks doesn't break when using query string
                try_files $uri $uri/ /index.php?$args;
        }

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

        # I tried commenting this as well
        rewrite /wp-admin$ $scheme://$host$uri/ permanent;

       # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/tmp/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
                deny all;
        }
}

1 个答案:

答案 0 :(得分:0)

是因为没有安装php5-curl ... apt-get install php5-curl修复了它;)