8 points · by ai09 · 16y ago · 6 comments
Can anyone recommend a rails plugin that will add standard blog functionality (posts, comments, tags, feeds, etc.) into existing rails apps? Or is there some way to 'symlink' (not the right word but a proxy for the idea) the www.mydomain.com/blog/... to use posterous, wordpress, tumblr, etc. underneath?
Lastly, I'd like to avoid rolling my own. I created a simple posts controller in a pinch for a site I started on Thursday (www.formds.com) which was great in allowing links to my main site, but I'd really like to avoid recreating the wheel. It looks bad and is time I'd rather spend elsewhere. I'd _love_ a symlink'd tumblr/posterous/wordpress running under my domain.
Thanks for thoughts,
Robert
b) This is not difficult to accomplish via Nginx (or whatever) using reverse-proxying.
http://www.kalzumeus.com/2009/08/22/using-wordpress-and-rail...
Basically I have Apache running on port 81 locally, and I setup the WordPress to a "blog" folder underneath the DocumentRoot.
Then within the server { } configure block in nginx, I have
server { # your server settings, like "listen 80;"
location /blog {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#add_header X-Marrily-DEBUG "$Host"; # turn this on to test the header
proxy_pass http://127.0.0.1:81;
}
}You will have to update the WordPress config to tell that it's installed in a sub folder and not at the root. It took me a while to figure out (all other articles online will tell you to update the wp-config.php file to define the different constants, but it's not the right spot for WordPress 3). You'd have to update the wp_options table as well to fix the path. Here's a screenshot: http://cl.ly/468cab133aca48eea173
Good luck!
(this post should go to StackOverflow, but since I just went through the exact same experience, I thought I'd share it)
I'd always thought that PR applies to your PAGES only. not domains. So, in your example, it's not that blog.twilio.com has a higher PR than www.twilio.com, it's that the blog.twilio.com INDEX page has a higher PR than the www INDEX page.
Thus, your PR isn't really affected by being on a subdomain, as the juice that flows through the system doesn't care about the sub/domain, only about the page and what points to it.
Please correct me as needed.