Apache 禁止WSGI POST请求403

Apache 禁止WSGI POST请求403,apache,post,wsgi,http-status-code-403,openstack,Apache,Post,Wsgi,Http Status Code 403,Openstack,为什么我不能做一个POST请求,尽管我得到了工作 wget --post-data "test" http://10.42.0.1/dashboard wget: server returned error: HTTP/1.1 403 FORBIDDEN 这是我的openstack-dashboard.conf WSGIDaemonProcess dashboard WSGIProcessGroup dashboard WSGISocketPrefix run/wsgi WSGIScriptA

为什么我不能做一个POST请求,尽管我得到了工作

wget --post-data "test" http://10.42.0.1/dashboard
wget: server returned error: HTTP/1.1 403 FORBIDDEN
这是我的openstack-dashboard.conf

WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
WSGISocketPrefix run/wsgi
WSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
Alias /static /usr/share/openstack-dashboard/static

<Directory /usr/share/openstack-dashboard/openstack_dashboard/wsgi>
  Options All
  AllowOverride All
  Require all granted
</Directory>

<Directory /usr/share/openstack-dashboard/static>
  Options All
  AllowOverride All
  Require all granted
</Directory>

RedirectMatch permanent ^/$ /dashboard/

是Django或Apache生成的403错误。用WSGI hello world程序替换Django应用程序来解决这个问题。如果是Apache,则这是一个虚拟主机。也许这个请求甚至不是针对那个虚拟主机的,我相信是Apache。我只在POST请求期间收到错误。我成功地做到了以下几点:(见帖子2)我不太明白你所说的VirtualHost是什么意思。我能够用一个基本的WSGI脚本完成一个帖子请求。希望我能找到有关此HTTP错误的更多详细信息。
import logging
import os
import sys
import django.core.handlers.wsgi
from django.conf import settings

# Add this file path to sys.path in order to import settings
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '../..'))
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
sys.stdout = sys.stderr

DEBUG = True

application = django.core.handlers.wsgi.WSGIHandler()