setup mod proxy for client

martexx

Verified User
Joined
Jul 30, 2006
Messages
134
Location
Texel the Netherlands
Hi

I have a client that needs a reverse proxy config for his site.

What they do:

They use wordpress and a translation plugin and a cache plugin
For the secundary language located at domain.com/langCode they want to use a different domain

What i tried before is to setup the new domain langcodedomain.com with a webroot of the cache directory of domain.com/langCode

Works and gives us a html version of the translated website. However in that case we have the default menu as its like that in the cache so it links to the original site.

I thought about making the links in the menu relative, but as the /langCode urls is virtual it does not work.
I thought about mod_rewrite at the domain.com but that gives seo problems as the urls are rewritten after clicking them.
It wold be indexed wrongly

So i then searched for a script or smth that could run after the cache recreation and search and replace the menu url and replace with new value but i could not find a way to do it neatly.

Im now thinking about mod_proxy but if i want to add that to the custom virtualhost config i cant find how.
The directadmin help link shows only how to do docroot and it works, but i cant add

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

If i do apache uses 5 gig memory and dies

Does anyone know how to deal with this, or maybe even better:
Could i use mod_html for this purpose of rewriting the urls?
 
I don't understand why you want to have all those complexity. But if you need to show content from another site on your domain you can use PHP functionality: fopen() or cURL, and write some kind of proxy. So no need to customize apache at all.

If you want to add custom directives for one particular vhost, then check this article on how to do that: http://help.directadmin.com/item.php?id=3
 
Back
Top