Failed to reverse proxy www.u-tokyo.ac.jp with nginx?

< H2 > reverse proxy www.u-tokyo.ac.jp failed < / H2 >

display Forbidden You don"t have permission to access / on this server.

the same configuration can be directed to the proxy www.moe.gov.cn

related codes

-sharpuser  nobody;
worker_processes  1;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    gzip  on;
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    gzip_http_version 1.1;
    gzip_vary on;


    server {
        listen 80;
        location / {
                proxy_pass https://www.u-tokyo.ac.jp;
                -sharpproxy_pass http://www.moe.gov.cn/;
                proxy_cache_valid 404 1m;
                proxy_cache_valid 200 302 1h;
                proxy_set_header        Accept-Encoding "";
                proxy_set_header        User-Agent $http_user_agent;
                }
            }
        }
Mar.24,2021

because access to https://www.u-tokyo.ac.jp will jump to https://www.u-tokyo.ac.jp/ja/..
you can try configuring https://www.u-tokyo.ac.jp, and then add path / ja/index.html when accessing the browser address bar.
for example, if http://localhost access , change it to http://localhost/ja/index.html access try

Menu