Reverse proxy

This commit is contained in:
2021-10-21 15:35:26 -04:00
parent 22ebac8ab7
commit 18c01097ac

View File

@@ -9,18 +9,23 @@ is_root
dnf install -y nginx || exit $? dnf install -y nginx || exit $?
cat <<- 'EOF' > /etc/nginx/conf.d/hartmanlab.conf cat <<- 'EOF' > /etc/nginx/conf.d/hartmanlab.conf
server { server {
listen 80; listen 80;
server_name localhost.cockpit; listen [::]:80;
server_name baeldung.com;
location / { location / {
proxy_pass http://127.0.0.1:9090/; proxy_pass http://127.0.0.1:9090/;
proxy_redirect http://127.0.0.1:9090/;
} }
} }
server { server {
listen 80; listen 80;
server_name localhost.robot; listen [::]:80;
server_name baeldung.com;
location / { location / {
proxy_pass http://127.0.0.1:8888/; proxy_pass http://127.0.0.1:8888/;
proxy_redirect http://127.0.0.1:8888/;
} }
} }
EOF EOF