OSX - High Sierra Reverse Proxy schlägt fehl
360
El Dude
Beim Versuch, auf meinem Entwicklungscomputer einen Proxy-Dienst einzurichten, der example.com/php
auf die Entwicklung einer Hybrid-App auf Basis von Ionic verweist, um CORS-Probleme zu vermeiden.
Was ich getan habe:
sudo vi /etc/apache/httpd.conf
aktivieren
LoadModule proxy_module libexec/apache2/mod_proxy.so LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
hinzufügen
Include /private/etc/apache2/vhosts/*.conf sudo vi /private/etc/apache2/vhosts/proxy.conf <VirtualHost localhost:9999> ProxyPass /php/ https://example.com/php </VirtualHost>
Mein Proxy funktioniert nicht:
~ $ nc -v localhost 9999 nc: connectx to localhost port 9999 (tcp) failed: Connection refused nc: connectx to localhost port 9999 (tcp) failed: Connection refused nc: connectx to localhost port 9999 (tcp) failed: Connection refused
Während Port 80 funktioniert:
~ $ nc -v localhost 80 found 0 associations found 1 connections: 1: flags=82<CONNECTED,PREFERRED> outif lo0 src ::1 port 50299 dst ::1 port 80 rank info not available TCP aux info available Connection to localhost port 80 [tcp/http] succeeded! HTTP/1.1 400 Bad Request Date: Wed, 25 Jul 2018 05:58:53 GMT Server: Apache/2.4.33 (Unix) Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> </p> </body></html>
Die Firewall ist deaktiviert, daher keine Ahnung, wo sie versagt. Apache-Protokolle melden nichts im Zusammenhang mit Proxy.
0 Antworten auf die Frage
Verwandte Probleme
-
4
Gutes freies Ubuntu Server-VMWare-Image benötigt
-
3
Beschleunigung der Bootzeiten von OS X bei einem Jahr alten MBP
-
3
Wie ordnen Sie ein Airport Time Machine-Backup nach der Migration auf einen neuen Mac wieder zu?
-
6
Wie können Sie den Startton auf einem Mac stummschalten?
-
5
Warum wird mein Macbook bei der Verwendung von Boot Camp extrem heiß?
-
7
Gibt es unter Mac OS X ein Strg + Tab-Äquivalent?
-
6
Weg, um Time Machine-Daten auf eine neue Festplatte zu migrieren
-
13
Setzen Sie die Windows-Position von Mac OS X nach dem Abnehmen des externen Monitors zurück
-
10
Sicherungssoftware für Mac OS X
-
5
Wie kann ich unter Mac OS X einen .kext deinstallieren und entfernen?