jekyll / jekyll-help

NO LONGER MAINTAINED. USE JEKYLL TALK INSTEAD.

Home Page:https://talk.jekyllrb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need Jekyll Help in running multiple jekyll instances on different port and using nginx server

gaurav181 opened this issue · comments

Dear Jekyll experts,
Need your help here. Can you please suggest or guide something.

  1. On an ubuntu server, I am running multiple Jekyll instances.
  2. Different versions of documents are checked out in different directory and each has an jekyll running.

top/dir1 --- jekyll port 4000
top/dir2 -- jekyll port 4001
top/dir3 --- jekyll port 4003

  1. These different jekyll instances are mapped on nginx

location /stg/ {
proxy_pass http:/localhost:4001/;
}

location / {
proxy_pass http://localhost:4000/;
}

Problem I am facing is, when I use stg environment by putting www.example.com/stg
top pages looks fine. But links under those pages goes to
www.example.com/ instead of www.example.com/stg.

e.g. link on page1 on stg
www.example.com/stg/page1

becomes
www.example.com/link1 instead of www.example.com/stg/link1

Any idea what can I configure in jekyll to get it fixed?
That way Jekyll generate full path for the URL (including directory under example.com).

Any help or input will be highly appreciated?

Thanks
-Gaurav

This repository is no longer maintained. If you're still experiencing this problem, please search for your issue on Jekyll Talk, our new community forum. If it isn't there, feel free to post to the Help category and someone will assist you. Thanks!