Passenger and maintenance page

software development

#1

Hi,

I’ve seen some messages previously on the forum reporting that .htaccess files are not being handled when Passenger is enabled on a domain.

However, using .htaccess and mod_rewrite seems to be the easiest way to put a “in maintenance” page for a rails application, while it is being upgraded and database data is being migrated.

Does anybody have a suggestion on how to quickly put a rails app to display a maintenance, so I can safely replace the app code and migrate the database data, without using .htaccess?

Eduardo


#2

I’ve just found out something interesting: .htaccess isn’t entirely disabled when using Passenger. It works for the static files on the ‘public’ directory, but not for requests that will end up being directed to rails.

That explains why an existing .htaccess sometimes cause problems for people using Passenger, but it doesn’t work when you want to restrict/rewrite all requests for the rails application.

Eduardo