Squashed initial commit
This commit is contained in:
31
server-scripts/script-install-reverse-proxy
Normal file
31
server-scripts/script-install-reverse-proxy
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# Adds a reverse proxy for local system services
|
||||
# Copyright 2021 Bryan C. Roessler
|
||||
|
||||
parent="${BASH_SOURCE[0]}"
|
||||
parent=${parent%/*}
|
||||
|
||||
[[ -f $parent/script-functions ]] && . "$parent"/script-functions || exit 1
|
||||
|
||||
is_root
|
||||
|
||||
dnf install -y nginx || exit $?
|
||||
|
||||
cat <<- 'EOF' > /etc/nginx/conf.d/hartmanlab.conf
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name localhost;
|
||||
location /cockpit {
|
||||
proxy_pass http://localhost:9090;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
# location /robot {
|
||||
# proxy_pass http://127.0.0.1:8888;
|
||||
# proxy_redirect http://127.0.0.1:8888/;
|
||||
# }
|
||||
|
||||
systemctl enable --now nginx
|
||||
|
||||
exit $?
|
||||
Reference in New Issue
Block a user