question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The page of jekyll-admin is blank

See original GitHub issue

Description:

Tell us a bit about yourself:

  • Version of JekyllAdmin I’m using <HINT: use bundle show to check>:
    jekyll-admin (0.8.1)
  • Version of Jekyll I’m using <HINT: use bundle show to check>:
    jekyll 3.8.5
  • Version of NodeJS I’m using <HINT: use node -v to check>: Not using node
  • Operating System <e.g. OS X, Windows>: CentOS Linux release 7.6.1810 (Core) (VPS)
  • Browser <e.g, Safari, Chrome>: Chrome

Steps to reproduce:

I expected the following:

  1. jekyll is installed correctly;
  2. But the jekyll‘s default port is 4000, so I installed the nginx, and then proxy the data from 4000 to 80 port. The configure of nginx is as follows:
server {
    listen 80;
    server_name 47.107.164.222;
    location / {
        proxy_pass http://localhost:4000;
    }
}

and when I enter IP (instead of IP:4000) in the browser, the page of Jekyll is displayed normally, as follows: image 3. When I installed Jekyll-admin and typed IP/admin in the browser, the page was blank. image No information was displayed, as well as error.

But got the following, instead:

A blank page

Other details:

So how to solve this problem?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tomscytalecommented, Oct 1, 2019

Got it working!

     location ^~ /admin {
         proxy_pass http://127.0.0.1:4000/admin;

         auth_basic "Administration";
         auth_basic_user_file /etc/nginx/htpasswd;

         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header X-Forwarded-Proto $scheme;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header Host $http_host;
     }
     location ^~ /_api {
         proxy_pass http://127.0.0.1:4000/_api;

         auth_basic "Administration";
         auth_basic_user_file /etc/nginx/htpasswd;

         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header X-Forwarded-Proto $scheme;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header Host $http_host;
    }

Ideally we’d combine the blocks using a regex, but I can’t get it working - I’ve tried

     location ~ ^/(admin|_api)(/.*)? {
         proxy_pass http://127.0.0.1:4000/$1;

        ....

(this block needs to come before regex location matches for the main site) but for some reason .js and .css files get their mime type set to text/html when I do this.

And you must enable some kind of authentication - I’ve used http basic auth

         auth_basic "Administration";
         auth_basic_user_file /etc/nginx/htpasswd;

See the nginx docs

1reaction
20chancommented, Jun 28, 2019

I have same problem. When I send http request to /_api/configuration/ with Referer header, it just returns 403 stauts. Without Referer header it works fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jekyll + GitHub works on local but empty page on https ...
Hi I'm a newbie on jekyll. I have a problem with building my github blog using jekyll. I succeeded building jekyll blog on...
Read more >
Blank Page
Addons. Pages. Login Screens: LoginRegisterForgot Password. Other Pages: 404 PageBlank ... vsoch/sb-admin-jekyll; 5 Stars; 3 Forks. Blank Page. © vsoch • 2019.
Read more >
#Jekyll Admin - YouTube
In today's video, I figured we could take a look at this tool I found together. I have never even installed this tool...
Read more >
Jekyll works locally but comes up blank on github pages - Help
I am trying to build a page from a github repo in an org. Jekyll version 3.4.1. created repo - username.orgcustomdomain.
Read more >
jekyll/jekyll - Gitter
Jekyll adds all new pages to this navigation bar, but seeing as I will have ... jekyll-admin Display in the lower right corner...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found