I understand that Octopress is designed to run as a standalone web application.
I have a personal website, and I want to add a blog to it, and for numerous reasons I would like to use Octopress for this. Rather than having two separate applications and repos in git, I would like to integrate these apps together.
Is there a reliable way to integrate Octopress into an existing Rails 4.0 application?
Would my best bet be to mount Octopress as a rack application inside the Rails router, or is there a better way?
I think your best bet is to have a frontend server like nginx as a reverse proxy and do the redirecting/proxying from there.
So you will have an nginx.conf
something along the lines of:
server {
listen 80;
server_name domain.com;
location / {
# ... proxy config stuff to rails ...
}
}
server {
listen 80;
server_name blog.mydomain.com;
location / {
root /to/octopress/static/folder
}
}
My example is if you use a subdomain blog.domain.com
. But obviously if you have domain.com/blog
, it will still work, just do some tweaking on the nging.conf
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With