How do I tell my local server to interpret all relative paths, that start with a /uploads/, from a remote server (the production server)?
The uploads folder is out of version control and I don’t have it in my local server (the testing server).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the mod_proxy module of apache.
The
ProxyRequests Offdisables forward proxy so your machine can’t be used as a proxy server.The
<Proxy *>...</Proxy>sets the access rights to your (Reverse-)Proxy; ‘all’ in this case.And finaly the
ProxyPassandProxyPassReversedefine that every request to ‘/uploads’ should be passed on to ‘http://live.domain.com/uploads’ (->ProxyPass) and every response from ‘http://live.domain.com/uploads’ should be treated as it would be from ‘/uploads’ (->ProxyPassReverse).