enhance(): Adding the nginx configuration
This commit is contained in:
parent
567c471e86
commit
6b3c614cbe
2 changed files with 21 additions and 0 deletions
|
@ -29,6 +29,7 @@ steps:
|
|||
GID:
|
||||
from_secret: gid
|
||||
commands:
|
||||
- mv nginx/ public/
|
||||
- chown -R "$UID":"$GID" public/
|
||||
- mv public/ "/blog/${DRONE_COMMIT}"
|
||||
- cd /blog/
|
||||
|
|
20
nginx/default.conf.template
Normal file
20
nginx/default.conf.template
Normal file
|
@ -0,0 +1,20 @@
|
|||
server {
|
||||
|
||||
listen ${NGINX_BLOG_PORT};
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html/${NGINX_BLOG_HOST};
|
||||
|
||||
error_page 404 /not-found/index.html;
|
||||
error_page 403 /forbidden/index.html;
|
||||
|
||||
location / {
|
||||
index index.html;
|
||||
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ^~ /nginx/ {
|
||||
return 403;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue