github.io 的 Nginx 代理返回 404

Lee*_*ope 6 reverse-proxy nginx github-pages

我正在尝试使用 Nginx 作为我在 github 页面上的页面的反向代理。根据此处的信息:https : //pascal.io/github-pages-https/和其他人,我的配置如下所示:

server {
     listen 80 default_server;
    server_name leepope.com www.leepope.com;
    return 301 https://$host$request_uri;
}

server {
  listen 443 ssl http2;
  server_name leepope.com;


  ssl                 on;
  ssl_certificate     <my cert>;
  ssl_certificate_key <my key>;
  ssl_dhparam         /etc/ssl/certs/dhparam.pem;

  ssl_protocols        TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers          HIGH:!aNULL:!MD5;
  ssl_session_cache    shared:SSL:10m;
  ssl_prefer_server_ciphers   on;

  add_header Strict-Transport-Security max-age=15768000;


  location / {
    proxy_pass              https://leepope.github.io;
    proxy_set_header        Host               $host;
    proxy_set_header        X-Real-IP          $remote_addr;
    proxy_set_header        X-Forwarded-For    $proxy_add_x_forwarded_for;
    proxy_intercept_errors  on;
    expires                 off;
  } 
}
Run Code Online (Sandbox Code Playgroud)

当我向服务器根目录发出请求时,我得到了一个 github 页面,但它是 404。

我已经启用了 nginx 调试,但是我看不到发送到 github 的请求是什么样的 - 它们的标头在日志中,但是没有关于发生了什么的信息。

谁能帮我解决这个问题?

谢谢。