Remove default block from nginx config

Risto Helinko 2020-11-06 12:21:37 +02:00
parent 580ec9f6d3
commit b086a7a40d
3 changed files with 2 additions and 32 deletions

View File

@ -3,9 +3,6 @@ FROM nginx:1.18
# default conf for proxy service
COPY ./default.conf /etc/nginx/conf.d/default.conf
# NOT FOUND response
COPY ./backend-not-found.html /var/www/html/backend-not-found.html
# Proxy and SSL configurations
COPY ./includes/ /etc/nginx/includes/

View File

@ -1,6 +0,0 @@
<html>
<head><title>Proxy Backend Not Found</title></head>
<body >
<h2>Proxy Backend Not Found</h2>
</body>
</html>

View File

@ -1,10 +1,11 @@
# plain http redirect to https
server {
listen 80;
listen [::]:80;
server_name localhost;
return 301 https://$server_name$request_uri;
}
# web service1 config.
# main server, reverse proxy to 'web' container
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
@ -23,25 +24,3 @@ server {
access_log off;
error_log /var/log/nginx/error.log error;
}
# Default
server {
listen 80 default_server;
server_name _;
root /var/www/html;
charset UTF-8;
error_page 404 /backend-not-found.html;
location = /backend-not-found.html {
allow all;
}
location / {
return 404;
}
access_log off;
log_not_found off;
error_log /var/log/nginx/error.log error;
}