diff --git a/Dockerfile b/Dockerfile index e9d3991..508f2a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,4 @@ FROM klakegg/hugo:onbuild AS hugo FROM nginx:alpine-slim COPY --from=hugo /target /usr/share/nginx/html -COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..ce9e369 --- /dev/null +++ b/default.conf @@ -0,0 +1,15 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} + diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 099631e..0000000 --- a/nginx.conf +++ /dev/null @@ -1,16 +0,0 @@ - -user nginx; -worker_processes auto; -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; -events { - worker_connections 1024; -} -http { - server { - root /usr/share/nginx/html; - location / { - error_page 404 /404.html; - } - } -} \ No newline at end of file