Created
October 25, 2018 19:16
-
-
Save htuscher/53b5203ed2dfecf101ba9861cbe7fcda to your computer and use it in GitHub Desktop.
WebDevOps nginx custom error pages
This file contains hidden or 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
error_page 404 = /notfound.html; | |
error_page 500 = /error.html; | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_read_timeout <PHP_TIMEOUT>; | |
fastcgi_intercept_errors on; | |
} |
This file contains hidden or 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
FROM webdevops/php-nginx:ubuntu-16.04 | |
COPY 10-php.conf /opt/docker/etc/nginx/vhost.common.d/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! That worked great to fix my custom error 500 page