domain with subdirectory


i have 2 apache server… server1 can be access by public. server2 is a local server

on server1 i have other web directory. ,

i am using alias /web1 to make client can access

i have make new content on server2 for web1 from local network i can access the newweb1 using http://ipserver2/newweb1

so now how can i make client from public to access newweb1 using url

i have try using proxypass but the hyperlink inside newweb1 is point to ip address for local server2.



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

i already include inside apache server1 config

 ProxyPreserveHost on
 ProxyPass /web1 http://server2ip/newweb1
 ProxyPassReverse /web1 http://server2ip/newweb1

i’am using Joomla 3.8

newweb1 can be access by url but the hyperlink inside the web is refer to the local ip address.

Thank you in advanced

Hey friend!

You are on the right path with proxypass, reverse proxy is how you handle the task at hand. The reason the links are going to the IP is that the site at IP/newweb1 is configured that way. I’m betting it’s a Wordpress site, those hard code their URL into them when set up. It can be changed though, and there are some steps for doing so here:

If I’ve made a wrong assumption, let me know :)