Heim >Betrieb und Instandhaltung >Apache >So konfigurieren Sie die Portweiterleitung in Apache

So konfigurieren Sie die Portweiterleitung in Apache

王林
王林nach vorne
2020-12-08 16:26:238410Durchsuche

So konfigurieren Sie die Portweiterleitung in Apache

Die spezifische Methode zum Konfigurieren der Portweiterleitung in Apache lautet wie folgt:

(Verwandte Empfehlungen: Apache)

Entfernen Sie die Datei httpd.conf # Kommentar

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Include conf/extra/httpd-vhosts.conf

Konfigurieren Sie httpd-vhosts.conf

<VirtualHost *:80>
       ProxyPreserveHost On
       ServerAdmin icytail@iyume.cn
       ServerName iyume.cn
       ProxyPass / http://127.0.0.1:9000/
       ProxyPassReverse / http://127.0.0.1:9000/
</VirtualHost>
<VirtualHost *:80>
       ProxyPreserveHost On
       ServerAdmin icytail@iyume.cn
       ServerName www.iyume.cn
       ProxyPass / http://127.0.0.1:9000/
       ProxyPassReverse / http://127.0.0.1:9000/
</VirtualHost>

Speichern und starten Sie Apache neu, besuchen Sie ( www.)iyume.cn wird an Port 9000 dieser Maschine weitergeleitet

Das obige ist der detaillierte Inhalt vonSo konfigurieren Sie die Portweiterleitung in Apache. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Dieser Artikel ist reproduziert unter:csdn.net. Bei Verstößen wenden Sie sich bitte an admin@php.cn löschen