##// END OF EJS Templates
rccontrol: expose custom 404 page to catch service loading/not-started
rccontrol: expose custom 404 page to catch service loading/not-started

File last commit:

r125:3c14314d
r125:3c14314d
Show More
nginx_errors.conf
69 lines | 1.9 KiB | text/plain | TextLexer
user root;
worker_processes 1;
pid /var/run/nginx.pid;
error_log /dev/stdout info;
events {
worker_connections 256;
# multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';
access_log /dev/stdout main;
keepalive_timeout 65;
types_hash_max_size 2048;
## custom log format
log_format http_log_custom '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $request_time $upstream_response_time $pipe';
log_format json_log_custom escape=json
'{'
'"source":"nginx",'
'"remote_user":"$remote_user",'
'"time_local":"$time_local",'
'"remote_addr":"$remote_addr",'
'"host":"$host",'
'"proxy_x_forwarded_for":"$proxy_add_x_forwarded_for",'
'"request":"$request",'
'"status": "$status",'
'"request_method": "$request_method",'
'"body_bytes_sent":"$body_bytes_sent",'
'"request_time":"$request_time",'
'"upstream_response_time":"$upstream_response_time",'
'"http_referrer":"$http_referer",'
'"http_scheme":"$scheme",'
'"http_user_agent":"$http_user_agent"'
'}';
server {
listen 80 default;
# ensure we get the proper Docker DNS resolver for load balancing.
resolver 127.0.0.11 ipv6=off valid=10s;
server_name localhost 127.0.0.1;
access_log /dev/stdout json_log_custom;
error_log /dev/stdout;
error_page 404 /404.html;
location / {
root /etc/nginx/error_pages;
internal;
}
}
}