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>