Hey everyone,
I'm trying to run wordpress along with a rails app on an ec2onrails
instance. The rails app is working (yes!). The setup I've been using
took a few lines of apache config on my local passenger setup, but
alas I haven't been so lucky getting it working on ec2onrails.
So far I've got PHP installed by adding 'php5' to this line in the
deploy.rb:
:packages => ["logwatch", "imagemagick", "php5"],
I've added these lines so I can add some apache config:
:server_config_files_root => "config/server_config",
:services_to_restart => %w(apache2),
and I've placed a 'app.custom' file in 'config/server_config/etc/
apache2/site-available'. When I 'cap ec2onrails_setup' the
'app.custom' file copies over like a charm. Inside the 'app.custom'
is:
Alias /blog /mnt/wordpress
<Directory "/mnt/wordpress">
AllowOverride All
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory>
But every request to '
http://mysite.com/blog' goes to the rail app
'page not found' page. What I believe I'm stuck on are these rewrite
rules sending everything over to the balancer, found in '/etc/apache2/
sites-available/app.common':
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]
I need to figure out a way to punch a hole in that rule so that
traffic to '/blog' goes to my Alias directive rather than redirecting
away to the mongrel cluster. If someone knows how to do that off the
top of their head I'd be much obliged if they could give me a
pointer...if not I shall embark on decoding the meaning of those lines
and let y'all know once I've figure it out...