0

あるサーバーの 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;
        }
}
4

1 に答える 1

0

php5-curl がインストールされていなかったためです... apt-get install php5-curl で修正されました;)

于 2012-09-06T06:53:13.583 に答える