Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I have two Apache Servers, Server A (, Server B (, both running at the same 80 port.

The actual request is from server a and the with my configuration it pass to server b (using mod_proxy), this is working.

Server A configuration:

NameVirtualHost *
<VirtualHost *>

    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all

    ProxyPass /
    ProxyPassReverse /
    <Location />
        Order allow,deny
        Allow from all

when I access to the request is access using SERVER A but with the proxy it "proxies" to server B and then I see the content in server B, that's great but now my content is in, I don't know how to that url can be proxied and redirected using only

This is other configuration that I use in my server A for use the mod_proxy

 RewriteCond %{HTTP_HOST}   ^mycloud\.mydomain\.com$ [NC]
 RewriteRule   ^/(.*)$$1  [P]

I want when a user access to the mod_proxy redirect and proxy to

How can I do this?


My new configuration is:

RewriteCond %{HTTP_HOST}   ^owncloud\.mydomain\.com$ [NC]
RewriteRule ^/(.*)$$1 [P,L]
ProxyPassReverse /

Im redirecting to but the pages doesnt render well (like some css are not loading) but if i just add the /owncloud, everything works, but i dont want the user add the /owncloud. This is not working as expected, do im doing something wrong?

share|improve this question

Change thes proxying slightly using these lines:

 RewriteRule ^/(.*)$ http:///$1 [P,L]
 ProxyPassReverse /

These lines should replace these lines:

ProxyPass /
ProxyPassReverse /

The above lines say connections coming into / go to http:/// (RewriteRule) and that connections going back out from the proxied server /owncloud/ get rewritten to / (ProxyPassReverse).

share|improve this answer
Hi, i edit the question adding your suggested configuration, but it didnt work for me, i hope you can still help me, thanks a lot. – maxtorzito May 28 '13 at 14:33

I'm working on the same trouble. I think that apache config is right but you need some changes in config.php of owncloud something like

'overwritehost' => '',
share|improve this answer

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.