nginx - 使用 nginx 反向代理访问所有路径
问题描述
我有一个 django 应用程序,它在我的服务器的 localhost:8000 中运行。并且有 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;
}
}
在我的笔记本电脑上,我只能访问 /。
我的其他网址无法访问。
有什么方法可以使我的网址可访问?
解决方案
推荐阅读
- r-markdown - kableExtra:在 ioslides_presentation 上设置表格宽度
- excel - 将二维矩阵的行(或列)和 Excel 公式中的一维数组相加
- python - 获取求和的嵌套字典值列表
- c# - 在c#中将DataTable导出到word
- asp.net-mvc - 将路由值传递给 Html.BeginForm
- java - Java 库路径 - Mac 上的 UnsatisfiedLinkError
- android - Gson:Android 4.2.2 设备的 NoSuchMethodException
- javascript - Android Studio 中的 WebView 应用
- c# - Android - 使用布尔检查“自定义列表视图”中的复选框
- tensorflow - mobilenet-ssd的量化