Skip to content

Instantly share code, notes, and snippets.

@Redempter
Forked from htuscher/10-php.conf
Created October 25, 2018 20:26
Show Gist options
  • Save Redempter/ba3f6600516bd93f102b37b05436eaf1 to your computer and use it in GitHub Desktop.
Save Redempter/ba3f6600516bd93f102b37b05436eaf1 to your computer and use it in GitHub Desktop.
WebDevOps nginx custom error pages
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;
}
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