Created
January 4, 2020 14:43
-
-
Save pandanote-info/880db164b584cdb37629a4053ea88376 to your computer and use it in GitHub Desktop.
Wordpressで用意した404.phpを表示させるためのnginx.confの設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
(略) | |
server { | |
(略) | |
error_page 404 = @notfound; | |
location @notfound { | |
root (Apache httpdでDocumentRootとして設定していた値); | |
include fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_param SERVER_NAME $host; | |
fastcgi_param SCRIPT_FILENAME $document_root/index.php; | |
fastcgi_param QUERY_STRING error=404; | |
fastcgi_pass php-fpm; | |
} | |
(略) | |
} | |
(略) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment