2016-08-01 24 views
1

postalnameを使用するようにパーマリンク構造を変更しました キャッシュをクリアするためにNginxを再起動しましたが、ホームページを表示することができます。 nginxのを使用して...wordpress - permalinksの更新後に404ページが見つかりませんw Nginx

見つからない404ページ、私は.htaccessファイルを更新する必要はありませんが、私は私のサイトnginxのconfのファイルを更新する必要があります...ここ

は一緒に使用場所の部分であります.php

 location ~ \.php$ { 
      try_files $uri =404; 
      fastcgi_pass 127.0.0.1:9000; 
      # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; 
      fastcgi_index index.php; 
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
      include fastcgi_params; } 

フィードバックK

答えて

3

それは完全なファイルのセクションではありません...今細かい作業

location/{ 
     # include the "?$args" part so non-default permalinks doesn't break when using query string 
     try_files $uri $uri/ /index.php?$args; 
    } 

へ/場所を更新しました!サーバー{}が見つかりません。

使用しこれが、サーバーとの間のこのいずれかを使用し、{}と動作するはず

location ~ \.php$ { 
     try_files $uri =404; 
     fastcgi_pass 127.0.0.1:9000; 
     # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; 
     fastcgi_index index.php; 
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
     include fastcgi_params; 
} 
if (!-e $request_filename) { 
    rewrite ^.*$ /index.php last; 
} 
関連する問題