Apache folder in another server

Hello,

I would like to point a folder to another server with apache, can that be done?

For example: site.com/folder should point to another server, should that be done with ProxyPass?

Thank you.

6 Replies

… sure, you COULD proxy, but it will trombone all the traffic through your server. It will also mean the destination server will need some magic configuration in order to trust X-Forwarded-For and/or X-Real-IP from your server.

Redirects are usually the better choice.

(Note: I'm assuming by "another server" you mean a completely other server, like if I wanted http://hoopycat.com/reddit/ to actually be http://www.reddit.com/r/hoopycat/ or something. If you mean "another server" like "I've got a couple applications on this server and a couple on another server and I want to make it all work like it's one big happy server", then yes, proxy is the right tool.)

Sorry but I did not get your note…

And redirects with apache you mean?

He means, instead of getting the data for the client yourself, it makes more sense to send the client to the other server to get it themselves.

Been awhile since I've used Apache, but it would involve mod_redirect (RewriteRule).

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct