首页 > 解决方案 > 使用 nginx 反向代理访问所有路径

问题描述

我有一个 django 应用程序,它在我的服务器的 localhost:8000 中运行。并且有 3 个网址可用。

  1. /行政
  2. /阅读材料
  3. /活动

我使用 nginx 作为反向代理。这是我的配置文件。

server {
        listen 80;
        listen [::]:80;

        server_name readfast-be.id;

        location / {
        proxy_pass http://127.0.0.1:8000/;
                try_files $uri $uri/ =404;
        }
}

在我的笔记本电脑上,我只能访问 /。

无障碍

我的其他网址无法访问。

无法访问

有什么方法可以使我的网址可访问?

标签: nginxreverse-proxynginx-reverse-proxynginx-config

解决方案


推荐阅读