Dear Jekyll experts,
Need your help here. Can you please suggest or guide something.
On an ubuntu server, I am running multiple Jekyll instances.
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
These different jekyll instances are mapped on nginx
location /stg/ {
proxy_pass http:/localhost:4001/;
}
If you are doing all that in ubuntu and nginx then you may already know all of the following but I will post it just in case:
kind of sounds the same as GH pages on a project - maybe you should use baseurl and prepend that to your urls?
If the website is in a sub folder rather than the root, and you have a url like /contact/ the first / I believe is saying go all the way to the root and then look for /contact. but it sounds like it is really in a sub folder called stg and then it is /contact, This is where people have trouble with GH - their project name is really a sub directory to their username.
You may have some trouble with this though if you are using jekyll serve on the server - as it may be disregarding baseurl since it thinks you are doing dev work locally - I think you can over ride this if you set the enfironment to something other than development.
This links to info about jekyll serve and what it is doing with baseurl: