Update Section_07/main.sh, Section_07/reverse_proxy.conf

This commit is contained in:
Kishan Takoordyal 2023-05-20 19:31:06 +00:00
parent f96755e09d
commit 2516b164b5
2 changed files with 26 additions and 0 deletions

12
Section_07/main.sh Normal file
View File

@ -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

View File

@ -0,0 +1,14 @@
<VirtualHost *:80>
# 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/
</VirtualHost>