apache mod_proxy, configuring ProxyPass & ProxyPassReverse for cross-domain ajax calls

后端 未结 3 1318
暗喜
暗喜 2020-12-14 22:41

I\'m creating an html5 - JavaScript app (for mobile devices, using PhoneGap). I have to interact with a REST service.

The service is now running on \"http://lo

3条回答
  •  一整个雨季
    2020-12-14 22:55

    You could simply add the given lines in the httpd.conf after enabling the proxy modules.

    ProxyPreserveHost On
    ProxyPass /EMBackend http://localhost:8080/backend/mvc
    ProxyPassReverse /EMBackend http://localhost:8080/backend/mvc
    

    Just restart the server and you are done.

提交回复
热议问题