2

I would like to know if it is possible to host a wordpress blog on the subdirectory of a rails application:

For instance: I would like to have domain.com/blog instead of having my blog on a subdomain: blog.domain.com .

I'm currently using lighttpd, but I can switch to something else if there is a solution.

Thanks

6

You can also set an apache Alias to say /blog is /path/to/wordpress

so it's technically not inside your RoR app, you can deploy/make changes to the RoR app all day long then, without the need to worry about overwriting wordpress files.

3

As long as you don't have conflicting htaccess directives, you should be fine. I'd still suggest you stick to the subdomain, though. Doing so is much cleaner for cookies (as well as for sessions if your RoR app uses any of the latter).

1

If you're using Phusion Passenger, you can try the following:

<VirtualHost *:80>
ServerName www.foo.com
DocumentRoot /apps/foo/public
<Directory /apps/foo/public/wordpress>
    PassengerEnabled off
    AllowOverride all      # <-- Makes Wordpress's .htaccess file work.
</Directory>

Source: http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerenabled_lt_on_off_gt

  • The asker is using lighttpd, the code you posted looks like for apache. But interesting. – hakre Dec 16 '10 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.