nondescript
nondescript

Reputation: 1496

how to enable mod_proxy in amazon EC2?

I am running apache and tomcat in different ports as I am using tomcat only for REST API using JAVA and apache for html/js/css etc .

Now I want to enable reverse-proxy the ajax calls to tomcat server ( as otherwise my REST calls are failing due to cross-domain policy ).

Please advise 1) how to enable reverse proxy in apache ?

(OR)

2) Is there any better way to do this

thanks in advance

Upvotes: 1

Views: 4018

Answers (1)

nondescript
nondescript

Reputation: 1496

Ok, figured out how to do this

There are two ways to do this - 1) mod_jk or 2) mod_proxy

I decided to go with mod_proxy as it is simpler

Enable the mod_proxy using moda2en

added this in httpd.conf

SSLProxyEngine On

SSLProxyVerify none

SSLProxyCheckPeerCN off

SSLProxyCheckPeerName off

SSLProxyCheckPeerExpire off

ProxyPass “patterntoproxy” “full URI”

Note: no need to wildcards in ProxyPass line

Sample: ProxyPass /webapi/ https://:8443/webapi/

Upvotes: 1

Related Questions