Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

So we wish to host some pages on a new server with apache2, and embed some of our old content & functionality from another server with lighttpd in an iframe. I'm looking at this configuration from the apache docs (http://httpd.apache.org/docs/2.2/vhosts/examples.html#page-header) under "Using Virtual_host and mod_proxy" together.

<VirtualHost *:*>
    ProxyPreserveHost On
    ProxyPass /
    ProxyPassReverse /
   ServerName hostname.example.com

The only issue is that I want to proxy only on a subdomain, or even better, if I can keep the top domain and proxy only if the url contains a particular path ie. "/myprocess.php". So in essence the DNS will point to the apache2 as the "master router".

share|improve this question
add comment

1 Answer

You can use mod_rewrite to set rules about which URLs should be served via reverse proxy. There is documentation about it on the Apache website: http://httpd.apache.org/docs/2.2/rewrite/proxy.html

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.