Answers for "node js server with domain or without port access or Use Apache as a Reverse Proxy"

0

node js server with domain or without port access or Use Apache as a Reverse Proxy

Step 1 — Enabling Necessary Apache Modules
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests

To put these changes into effect, restart Apache.

sudo systemctl restart apache2

Step 2 — Modifying the Default Configuration to Enable Reverse Proxy

Open the default Apache configuration file using nano or your favorite text editor.

sudo nano /etc/apache2/sites-available/000-default.conf

Example 1 — Reverse Proxying a Single Backend Server


add below lines in file   
/etc/apache2/sites-available/000-default.conf


<VirtualHost *:80>
    ProxyPreserveHost On

    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
Posted by: Guest on June-21-2021

Code answers related to "node js server with domain or without port access or Use Apache as a Reverse Proxy"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language