Merge branch 'nginx' into antifascista
This commit is contained in:
commit
c4bb74ff3a
2 changed files with 32 additions and 2 deletions
13
haini.sh
13
haini.sh
|
@ -2,6 +2,8 @@
|
|||
# Fallar ante cualquier error
|
||||
set -e
|
||||
|
||||
DIR="$(realpath "$0" | xargs -r dirname)"
|
||||
|
||||
# Por ahora sólo soportamos x86_64
|
||||
uname -m | grep -q x86_64 || exit 1
|
||||
|
||||
|
@ -30,7 +32,6 @@ correr() {
|
|||
bwrap \
|
||||
--unshare-user-try \
|
||||
--unshare-ipc \
|
||||
--unshare-pid \
|
||||
--unshare-uts \
|
||||
--unshare-cgroup-try \
|
||||
--bind "$ENTORNO" / \
|
||||
|
@ -75,11 +76,19 @@ crear_entorno() {
|
|||
tzdata bash ffmpeg vips file git make \
|
||||
ruby ruby-bundler ruby-json ruby-bigdecimal ruby-irb ruby-rake \
|
||||
nodejs yarn \
|
||||
gnutls-utils nghttp2 \
|
||||
gnutls-utils nginx \
|
||||
less"
|
||||
|
||||
# Habilitar la instalación de gemas binarias
|
||||
sed -re "s/#(@platforms = )/\1/" -i "$ENTORNO/usr/lib/ruby/2.7.0/rubygems.rb"
|
||||
|
||||
# Deshabilitar el usuario de nginx
|
||||
sed -re "/user nginx/d" -i "$ENTORNO/etc/nginx/nginx.conf"
|
||||
|
||||
# Crear el directorio del PID
|
||||
install -dm 755 "$ENTORNO/run/nginx"
|
||||
# Instalar la configuración
|
||||
install -m 640 "$DIR/nginx.conf" "$ENTORNO/etc/nginx/http.d/default.conf"
|
||||
}
|
||||
|
||||
crear_entorno
|
||||
|
|
21
nginx.conf
Normal file
21
nginx.conf
Normal file
|
@ -0,0 +1,21 @@
|
|||
server {
|
||||
server_name ~(?<domain>.+).sutty.local;
|
||||
listen 4000 ssl http2 default_server;
|
||||
|
||||
ssl_certificate /Sutty/sutty.local/domain/sutty.local.crt;
|
||||
ssl_certificate_key /Sutty/sutty.local/domain/sutty.local.key;
|
||||
|
||||
root /Sutty/$domain-jekyll-theme/_site;
|
||||
|
||||
add_header Cache-Control "no-store; max-age=0";
|
||||
|
||||
location /assets/js/ {
|
||||
proxy_pass http://127.0.0.1:65001;
|
||||
}
|
||||
|
||||
location /sockjs-node/ {
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_pass http://127.0.0.1:65001;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue