Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer

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).

share|improve this answer

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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