975 B
975 B
layout | title | date | tags | permalink | published | author | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
post | Proxy only non-existing files with mod_proxy and mod_rewrite | 2011-06-10 14:20:43+00:00 |
|
/blog/2011/6/10/proxy-only-non-existing-files-with-mod-proxy-and-mod-rewrite | true |
|
Today I got an interesting task. I had to upload some pdf documents to a site. The domain is ours, but we don’t have access to the application server that is hosting the page yet. Until we get it in our hands, I did a trick.
I enabled mod_rewrite
, mod_proxy
and mod_proxy_http
, then added the following
lines to my apache config:
{% highlight apache %} RewriteEngine on RewriteRule ^/$ http://172.16.72.131:8080/ [QSA,L,P] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.*) http://172.16.72.131:8080/$1 [QSA,L,P]
Order allow,deny Allow from all {% endhighlight %}
I’m not totally sure it’s actually secure, but it works for now.