apache - Allow internet users to access privately hosted website pages -


i have corporate private network(vpn) , on 1 vm website hosted can accessed internally only. e.g. https://internal.com/welcome.html

now, want allow few pages of site accessible outside own url.

e.g. open http://theirdoamin.com/welcome.html redirected private network , internally mapped/proxied https://internal.com/welcome.html.

this way outside never know actual url (i.e https://internal.com/welcome.html.

my question is, can achieve using apache reverse proxy server sitting in-front of hosted vm?

second question, can limit access welcome.html page , not others?

my colleague implemented using apache nifi still believe can simple done using apache reverse proxy setup.

please advise.

thanks

1) yes, apache reverse-proxy able that. 2) can limit access like.

1) i'd set 2 vhosts (for examples), 1 original name , 1 vpn-accessable name.

listen 80  #if running apache 2.2 you'll need following line, 2.4 won't namevirtualhost *:80  <virtualhost *:80>     documentroot "srv/www/example1"     servername internal.com      <directory "/srv/www/example1">         require granted     </directory>      # other directives here, if needed </virtualhost>  <virtualhost *:80>     servername external.com      proxypreservehost on     rewriteengine on     rewriterule ^ https://internal.com/welcome.html [p]     proxypassreverse / https://internal.com/ </virtualhost> 

you'll need rewriterule target specific file instead of whole domain. otherwise simple proxypass have been enough.

this requires modules mod_rewrite, mod_proxy , mod_proxy_http activated.

2) done rewriterule. allows access specific target-file (welcome.html).


Comments