仅为子目录启用 mod_xsendfile

仅为子目录启用 mod_xsendfile

我正在尝试仅为子目录启用 xsendfile /var/www/wsgi/site/priv。使用以下配置,我的网站提供 0 字节文件,这显然意味着 xsendfile 未正确启用。

<VirtualHost *:80>

    ServerName localhost
    ServerAdmin admin@localhost

    DocumentRoot /var/www/wsgi/site

    WSGIDaemonProcess site user=site group=site python-path=/usr/local/site:/usr/local/virtualenvs/site/lib/python2.7/site-packages
    WSGIProcessGroup site
    WSGIScriptAlias / /var/www/wsgi/site/wsgi.py

    <Files wsgi.py>
        Require all granted
    </Files>

    # ... some alias for static files ...

    Alias /priv/ /var/www/wsgi/site/priv/
    <Directory /var/www/wsgi/site/priv>
        Require all denied
        XSendFile On
        XSendFilePath /var/www/wsgi/site/priv/jobfiles
        # ^ I know that this is a different path. 
        # I only need access to that subfolder for now.
    </Directory>

    # ... logging conf ...

</VirtualHost>

xsendfile 的文档说这些指令在<Directory>so 中是允许的......

怎么了?

相关内容