Updated nginx.conf so we can extend it

This commit is contained in:
Deon George 2022-04-02 00:54:34 +11:00
parent 735f40610d
commit ad00aa25e9
2 changed files with 34 additions and 6 deletions

View File

@ -3,6 +3,7 @@
FROM nginx:latest
COPY etc/nginx/default.d /etc/nginx/default.d
COPY etc/nginx/nginx.conf /etc/nginx
COPY var/www/maintenance /var/www/maintenance
RUN chmod 444 /etc/nginx/default.d/ssl/* && chmod 400 /etc/nginx/default.d/ssl/default.key /etc/nginx/default.d/ssl/dhparams.pem
@ -16,12 +17,6 @@ RUN apt-get update && apt-get install python3-certbot-dns-cloudflare -yy \
# Add acme-lego Certbot
RUN curl -sL https://github.com/go-acme/lego/releases/download/v4.2.0/lego_v4.2.0_linux_amd64.tar.gz | tar -C /usr/local/sbin -xzf -
#RUN cd /usr/local/sbin && \
# curl -O https://dl.eff.org/certbot-auto && \
# chmod +x certbot-auto && ./certbot-auto -n --install-only
#
#RUN ln -s /usr/local/sbin/certbot-auto /usr/local/sbin/certbot
EXPOSE 80 443
COPY ssl.sh /usr/local/sbin/

33
etc/nginx/nginx.conf Normal file
View File

@ -0,0 +1,33 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
include /etc/nginx/include.d/*.conf;