nginx: Fix 404 page.
This commit is contained in:
parent
7844028dd6
commit
76ab8a58d1
3 changed files with 16 additions and 17 deletions
|
|
@ -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
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
15
default.conf
Normal file
15
default.conf
Normal file
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
16
nginx.conf
16
nginx.conf
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue