uwsgi总是在子文件夹中返回404

时间:2018-10-29 21:23:35

标签: nginx uwsgi

我在运行uwsgi + nginx组合时遇到问题。我的服务器有一个DNS地址,可以从Internet访问,但是由于管理原因,我不能使用子域。因此,我使用文件夹而不是子域。常规设置如下

<table>
  <thead>
    <tr>
      <th class="col-xs-2">Locations</th>
      <th class="col-xs-8">Users</th>
    </tr>
  </thead>
  <tbody>
    <tr v-for="(row, index) in rows[0].locations" v-bind:key="index">
      <td class="lead-locations">
        {{row.name}}
      </td>
      <td class="lead-users">
        <v-select multiple v-model="row.users" label="name">
        </v-select>
      </td>
    </tr>
  </tbody>
</table>

/ - NGINX standard setup page (working) /gitlab - Gitlab instance (working) /gitlab-tools - Gitlab extension (partly working) 是可与uwsgi(https://github.com/Salamek/gitlab-tools)一起使用的flask / python应用程序。当我访问/gitlab-tools时,nginx会识别URL并执行uwsgi应用程序(着陆页更改+ nginx日志更新+ uwsgi日志更新)。但是,uwsgi应用程序始终显示“ 404未找到”页面,而不显示其内容。

我的nginx配置是:

/gitlab-tools

location /test/ { alias /usr/lib/python3/dist-packages/gitlab_tools/static/; } location /gitlab-tools/ { alias /usr/lib/python3/dist-packages/gitlab_tools/; access_log /var/log/nginx/gitlab-tools_access.log; error_log /var/log/nginx/gitlab-tools_error.log debug; uwsgi_pass unix:///tmp/gitlab-tools.sock; include uwsgi_params; } 位置可以正常工作,整个文件夹都显示为403(禁止),但是可以在给出完整URL的情况下直接查看该文件夹中的文件。因此,我认为定位路径应该是正确的。

我的uwsgi配置如下:

/test

nginx日志告诉我,它可以正确访问uwsgi应用程序。因此,我想套接字通信工作正常。知道为什么我仍然会收到404吗?

0 个答案:

没有答案