plone - Apache - Proxy external files to download -


consider this:

  • we have external server files can downloaded
  • our website (plone based) interface downloading them , try hide direct links as possible
  • jquery.filedownload plugin needs cookie set on file on download

i'm trying set our apache configuration replace links this:

  • original: data-files-example.com/folder/subfolder/file.zip
  • replaced: our-website-example.com/_downloads/folder/subfolder/file.zip

so, missing part in case is: how set apache work this?

i'm trying:

namevirtualhost *:80 <virtualhost :80>     serveradmin email@our-website-example.com     servername our-website-example.com      rewriteengine on     rewriterule "^/_downloads(.)$" "https://data-files-example.com/$1" [p]       rewritecond %{request_method} ^(put|delete|propfind|options|trace|propfind|proppatch|mkcol|copy|move|lock|unlock)$      rewriterule .* - [f,l]     rewriterule ^/(.*) http://127.0.0.1:/virtualhostbase/http/data-files-example.com:80/my_plone_website/virtualhostroot/$1 [l,p]  </virtualhost> 

i receive 503 service unavailable.

how fix this?

following code @ least rewrites given original- desired target-url:

<virtualhost>     sslproxyengine on     rewriteengine on      rewritecond %{http_host} ^our-website-example.com$     rewriterule   "^/_downloads(.*)$"  "https://data-files-example.com/$1"  [p,l] </virtualhost> 

this requires modules mod_ssl, mod_proxy , mod_rewrite activated.

let know if sought solution , if not, went wrong :)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -