nginx - 80 and 443 inside container, to match docker-compose.yml

This commit is contained in:
Mike Holloway 2025-12-08 23:45:05 -05:00
parent a161b2d63e
commit 8cc4e49eb9
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
FROM nginx:latest
RUN sed -i 's/\#gzip.*on;/server_tokens\toff;\n #gzip\ton;/' /etc/nginx/nginx.conf
RUN sed -i 's/^error_log.*;/error_log\t\/var\/log\/nginx\/error.log debug;/' /etc/nginx/nginx.conf
RUN sed -i 's/\#gzip.*on;/server_tokens\toff;\n #gzip\ton;/' /etc/nginx/nginx.conf && \
sed -i 's/^error_log.*;/error_log\t\/var\/log\/nginx\/error.log debug;/' /etc/nginx/nginx.conf

View File

@ -9,12 +9,12 @@
}
server {
listen 8080;
listen 80;
return 301 https://$server_name$request_uri/;
}
server {
listen 4443 ssl;
listen 443 ssl;
server_name {{ inventory_hostname | default('ansible_undefined_host') }};
ssl_certificate /etc/nginx/certs/{{ inventory_hostname | default('ansible_undefined_host') }}.crt;