Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6876511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:29:10+00:00 2026-05-27T04:29:10+00:00

I am currently using Apache to proxy to Thin (using this article ) None

  • 0

I am currently using Apache to proxy to Thin (using this article)

None of my static assets work (e.g. stylesheets, javascripts). Is Apache supposed to be serving them or do I have to enable config.serve_static_assets in config/environments/production.rb? If Apache is supposed to serve them, then what am I probably doing wrong?

Here is my Apache config:

<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com

  DocumentRoot /home/r/public_html/example/public

  RewriteEngine On

  <Proxy balancer://thinservers>
    BalancerMember http://127.0.0.1:5000
    BalancerMember http://127.0.0.1:5001
    BalancerMember http://127.0.0.1:5002
  </Proxy>

  # Redirect all non-static requests to thin
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]

  ProxyPass / balancer://thinservers/
  ProxyPassReverse / balancer://thinservers/
  ProxyPreserveHost on

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  # Custom log file locations
  ErrorLog  /home/r/public_html/example/log/error.log
  CustomLog /home/r/public_html/example/log/access.log combined

</VirtualHost>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:29:11+00:00Added an answer on May 27, 2026 at 4:29 am

    Delete the following two proxy directive lines and it should work:

    ProxyPass / balancer://thinservers/
    ProxyPassReverse / balancer://thinservers/
    

    The first rewrite line (RewriteCond) is a test to see if the file exists on the filesystem in the public directory. If it fails, it continues to the next rewrite line (RewriteRule), which passes the request to the balanced proxy. This line actually does much the same thing as the two proxy directive lines.

    If the test succeeds (i.e the static file exists), it’ll skip this line. If you’ve removed the two lines above, apache would then serve the file from the document root. However, with the lines above in, it’ll just end up passing it over to the proxy anyway. Then as you pointed out, rails won’t be configured to serve this file by default and will return a 404.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using nginx as a transparent proxy for apache. I would like to
I'm using nginx as a reverse proxy to apache/mod_wsgi and Django. Currently everything is
Im currently using Apache behind an Nginx Proxy which really works fine with one
I am currently using an Apache front end for my Subversion repository, in order
How can I setup expires headers in PHP + Apache? I'm currently using an
Currently i'm using pretty much Unix + Mysql + Perl + Apache with some
I've been currently using PHP on Apache (on Ubuntu) to do dynamic server-side stuff,
I am currently using the WebClient in the Gargoylesoftware package and Apache Commons stuff..
I'm currently using ISAPI Rewrite I'd interesting in moving my ColdFusion app to Apache
I'm currently trying to consume a list of strings from some XML using Apache

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.