This becomes important when you start using SSL. Unfortunately, Apache cannot recognize 2 different NameVirtualHost at the same IP address in SSL mode... Bummer!
Rails to the rescue!
- Install Asset hosting with minimum SSL from his majesty DHH himself:
script/plugin install git://github.com/dhh/asset-hosting-with-minimum-ssl.git
(Warning though: it requires a version of Rails > 2.2, so you have to be ready to upgrade: see README for more details) - In production.rb:
config.action_controller.asset_host = AssetHostingWithMinimumSsl.new( "http://assets%d.example.com", # will serve non-SSL assetts on http://assets[1-4].example.com "https://assets1.example.com" # will serve SSL assets on https://assets1.example.com )
Aucun commentaire:
Enregistrer un commentaire