Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
Views
Apache ProxyPass Optimization vs Proxying via Rewrite Rule

Right now I am using Apache in front of Rails to serve static files. If the file is not found, I want it to pass the request on to Rails.

I found before that when I had proxy pass uncommented, it proxied all the files whether they were found or not. I found this way of making it work by proxying it through the rewrite rule, but I'm wondering if this is efficient enough. Some of the documentation seemed to suggest that using ProxyPass is more configurable/optimizable/performant.

Is there a way I can/should rewrite this to use ProxyPass? Thank you very much.

  # Redirect all non-static requests to thin
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ http://rails:3000%{REQUEST_URI} [P,QSA,L]
  
  #ProxyPass / http://rails:3000/
  ProxyPassReverse / http://rails:3000/
  ProxyPreserveHost on

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!