From 2516b164b5af2f068821661d2458dbefd48944e7 Mon Sep 17 00:00:00 2001 From: Kishan Takoordyal Date: Sat, 20 May 2023 19:31:06 +0000 Subject: [PATCH] Update Section_07/main.sh, Section_07/reverse_proxy.conf --- Section_07/main.sh | 12 ++++++++++++ Section_07/reverse_proxy.conf | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Section_07/main.sh create mode 100644 Section_07/reverse_proxy.conf diff --git a/Section_07/main.sh b/Section_07/main.sh new file mode 100644 index 0000000..a8cafe4 --- /dev/null +++ b/Section_07/main.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Apache2 +sudo systemctl enable apache2 --now +cd /etc/apache2/sites-available/ +sudo nano 000-default.conf +sudo nano reverse_proxy.conf +sudo a2ensite 000-default +sudo a2ensite reverse_proxy +sudo systemctl reload apache2 +# sudo systemctl stop apache2 +# sudo systemctl disable apache2 diff --git a/Section_07/reverse_proxy.conf b/Section_07/reverse_proxy.conf new file mode 100644 index 0000000..d4ef8a8 --- /dev/null +++ b/Section_07/reverse_proxy.conf @@ -0,0 +1,14 @@ + + # ServerName www.example.com + + ServerAdmin webmaster@localhost + # DocumentRoot /var/www/html + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + ProxyRequests Off + ProxyPreserveHost On + ProxyPass / http://localhost:5000/ + ProxyPassReverse / ​http://localhost:5000/ +