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/ +