简体   繁体   中英

Httpd.conf redirect to external url apache tomcat

I have an application that makes a call to an external URL. When I try to run it in localhost only some static HTML files which are in the localhost get loaded.

Any files located on the external URL doesn't load. It returns a 404 not found error.

I am using Apache sever, and Tomcat to run the application.

My Httpd.conf file has the following changes:

<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests On
ProxyVia On
ServerName localhost
ServerAlias *.localhost
ProxyPass /ab-ux-sass http://localhost:8080/ab-ux-sass
ProxyPassReverse /ab-ux-sass http://localhost:8080/ab-ux-sass
ProxyPass /ux-services https://boot.lender.com/ux-services
ProxyPassReverse /ux-services                    
                               https://boot.lender.com/ux-services
   </VirtualHost>

what config changes needs to be made?

Made the following changes in the Httpd.conf file. It is working now.

 <VirtualHost *:80>
  ServerName dev.localhost
  SSLProxyEngine on
  ProxyRequests Off
  <Proxy *>
   Order allow,deny
   Allow from All
 </Proxy>
   ProxyPass /ab-ux-sass http://localhost:8080/ab-ux-sass
   ProxyPassReverse /ab-ux-sass http://localhost:8080/ab-ux-sass
   ProxyPass /ux-services https://boot.lender.com/ux-services
   ProxyPassReverse /ux-services                    
                           https://boot.lender.com/ux-services
 </VirtualHost>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM