Estoy tratando de configurar un servidor proxy inverso en XAMPP para evitar el error CORS que ocurre cuando intento acceder a una API que se ejecuta en un puerto diferente. He realizado estos cambios en mis archivos.
Los detalles de la API son:
httpd-vhosts.conf
<VirtualHost *:8002> ProxyRequests On <Proxy> Order deny,allow Allow from all </Proxy> Header set Access-Control-Allow-Origin "*" </VirtualHost>httpd-proxy.conf
<IfModule proxy_module> <IfModule proxy_http_module> # # Reverse Proxy # ProxyRequests Off <Proxy *> Require all granted </Proxy> </IfModule> </IfModule>httpd.conf
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule rewrite_module modules/mod_rewrite.soCuando inicio mi servidor Apache, no se inicia y arroja un error:
Error: Apache se apagó inesperadamente.
15:00:12 [Apache] This may be due to a blocked port, missing dependencies, 15:00:12 [Apache] improper privileges, a crash, or a shutdown by another method. 15:00:12 [Apache] Press the Logs button to view error logs and check 15:00:12 [Apache] the Windows Event Viewer for more clues 15:00:12 [Apache] If you need more help, copy and post this 15:00:12 [Apache] entire log window on the forums¿Debo continuar con XAMPP o usar nginx para configurar el proxy inverso?