Serving jekyll generated site

MikeG nginx-forum at nginx.us
Sat Feb 20 01:41:09 MSK 2010


Hi all,

i'm trying to serve my blog made with jekyll and nginx. The blog should be hosted at 
http://www.mydomain.com/blog. The problem is that all css, images and the posts are
available at /css , /images and /2010/01/18/blogpost.html so they refere to the
http://mydomain.com/ although physically they are located at blog/...

Here you can see how it is stored on my server:

/var/www/blog$ ls
2008  css  images  index.html
xxx at xxx: /var/www/blog$ 

This is my nginx setup:

        location / {
                alias   /var/www/blog/;
        }

        location /blog {
                root    /var/www;
                index   index.html index.htm;
        }

So with this setup i can serve all pages but the problem is that if somebody access http://www.mydomain.com,
they will see the blog. This is not my expected behavior.

Could you please help me to set things up?

Thanks, Mike

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,55381,55381#msg-55381




More information about the nginx mailing list