simplify nginx configuration deployment
This commit is contained in:
parent
8a4a08cae8
commit
c748d7e960
@ -36,10 +36,8 @@ for server in ${servers[@]}; do
|
|||||||
rsync -rptcv --fsync --chmod=D755,F644 --delete static-tmp/ $remote:$target
|
rsync -rptcv --fsync --chmod=D755,F644 --delete static-tmp/ $remote:$target
|
||||||
ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
|
ssh $remote "ln -snf $target /srv/grapheneos.org && sync /srv/grapheneos.org"
|
||||||
|
|
||||||
sed "s|/srv/grapheneos.org|$target|" nginx-tmp/nginx.conf > nginx-tmp/nginx.conf.root
|
echo "root $target;" > nginx-tmp/root_grapheneos.org.conf
|
||||||
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/nginx.conf.root $remote:/etc/nginx/nginx.conf
|
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/{nginx.conf,mime.types,root_grapheneos.org.conf,snippets} $remote:/etc/nginx/
|
||||||
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/mime.types $remote:/etc/nginx/mime.types
|
|
||||||
rsync -rptcv --fsync --chmod=D755,F644 --delete nginx-tmp/snippets/ $remote:/etc/nginx/snippets
|
|
||||||
ssh $remote nginx -s reload
|
ssh $remote nginx -s reload
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -187,7 +187,7 @@ http {
|
|||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name grapheneos.org;
|
server_name grapheneos.org;
|
||||||
|
|
||||||
root /srv/grapheneos.org;
|
include root_grapheneos.org.conf;
|
||||||
error_page 403 =404 /404;
|
error_page 403 =404 /404;
|
||||||
error_page 404 /404;
|
error_page 404 /404;
|
||||||
|
|
||||||
|
2
nginx/root_grapheneos.org.conf
Normal file
2
nginx/root_grapheneos.org.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# placeholder for gixy
|
||||||
|
root /srv/grapheneos.org_a;
|
Loading…
x
Reference in New Issue
Block a user