小编Tom*_*rle的帖子

配置 Apache 以使用 WSGI 处理子路径

我正在尝试设置 Apache、Django 和mod_xsendfile以允许我使用 Django 身份验证控制对某些文件的访问,同时仍然使用 Apache 发送实际文件数据。

我对这个配置有问题:

# Some files must be publicly available without the Django auth check.
# When I comment this out, public media is not accessible but the WSGI script for
# /media/attachment DOES get called.
# So I think I need to somehow exclude /media/attachment from the effect of this Alias

Alias /media/ /var/www/vhosts/domain.com/subdomains/project/httpdocs/media/

# This <Location> block disables everything (Forbidden) regardless of the WSGI stuff
#
#<Location /media/attachments>
#    Deny from …
Run Code Online (Sandbox Code Playgroud)

apache-2.2

3
推荐指数
1
解决办法
6174
查看次数

标签 统计

apache-2.2 ×1