Apacheからnginxにうまく移行できない。
-
【はじめに】
長年 lolipop のレンタルサーバ(Apach http server)で運用してきたwordpressを さくらVPS(nginx)に移行しました。URLを変更せずの引っ越しだったため、wordpressのファイルが入ったフォルダとDBの内容をごっそりコピーしました。
結果、現在ブログのトップページ、管理ページは正常に表示できるようになりました。
http://popcosorn.com/blog/【現状の問題】
– 個別投稿が表示されない
— トップページから個別ページをクリックするとnginxの吐き出す「page not found」が出力される。
— 直接、個別投稿を表示しても同様
– 固定ページが表示されない
— トップページから固定ページをクリックするとnginxの吐き出す「page not found」が出力される。
— 直接、固定ページを表示しても同様【問題が発生した際のログの内容(例)】
2015/09/30 11:38:38 [error] 4747#4747: *168 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 58.98.179.137, server: popcosorn.com, request: "GET /blog/2015/09/american-underground-hiphop.html HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "popcosorn.com", referrer: "http://popcosorn.com/blog/"エラーの内容で調査中ですが、解決策はつかめておりません。(引き続き調査中です)
【改善が必要と思われる設定ファイル】
/etc/nginx/conf.d/wordpress.conf
—server { listen 80; server_name popcosorn.com; #charset koi8-r; charset utf-8; access_log /var/log/nginx/log/host.access.log main; location / { root /home/acchon; index index.html index.htm index.php; # wordpress custom perm link try_files $uri $uri/ /index.php?q=$uri&$args; } #error_page 404 /404.html; # 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; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { root /home/acchon; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/acchon$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; #} }以上、分かる方がおりましたらお助け頂ければ幸いです。
回答にあたり必要な情報が足りない場合はご教授頂ければ幸いです。
3件の返信を表示中 - 1 - 3件目 (全3件中)
3件の返信を表示中 - 1 - 3件目 (全3件中)
トピック「Apacheからnginxにうまく移行できない。」には新たに返信することはできません。