Node JS server z domeną lub bez dostępu do portu lub użyj Apache jako odwrotnego Proxy

Przykłady kodu

0
0

node JS server z domeną lub bez dostępu do portu lub użyj Apache jako odwrotnego 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>

Podobne strony

Podobne strony do przykłady

W innych językach

Ta strona jest w innych językach

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................