nginx - 80 and 443 inside container, to match docker-compose.yml
This commit is contained in:
parent
a161b2d63e
commit
8cc4e49eb9
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user