【问题标题】:How to change httpd.conf to allow large file upload如何更改 httpd.conf 以允许大文件上传
【发布时间】:2015-12-30 09:18:52
【问题描述】:

我有一个使用 Django 构建的 Web 应用程序。它需要用户上传 一份文件。但是,当我在最终生产中进行部署时 我收到此错误消息:

我应该使用什么指令来更改 HTTPD.CONF?

目前我的看起来像这样:

WSGISocketPrefix /u33/app/www/foobar/run

<VirtualHost *:8061>

    ServerAdmin coolguy@cool_univ.ac.id
    DocumentRoot /u33/app/www/foobar/html
    ServerName foo.ac.co.id
    ErrorLog logs/foobar-error_log
    CustomLog logs/foobar-access_log common
    ErrorLog /u33/app/www/foobar/logs/error_log
    ServerAlias foobar.com

    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip

    RewriteEngine on
    #RewriteCond %{REQUEST_URI} !/
    #RewriteRule ^ %{REQUEST_URI}/ [R=302,L]

    Alias /static/ /u33/app/www/foobar/html/

    RewriteCond   %{REQUEST_URI} ^/example1$
    RewriteRule ^(.+) http://cool_univ.ac.id/foobar/#/148/target-predictions [NE,R=302]

    <Directory "/u33/app/www/foobar/html/">
        Options FollowSymLinks
        AllowOverride None

        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/u33/app/www/foobar/cgi-bin">
        AllowOverride None
        #Options None
        Options FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>



    WSGIApplicationGroup %{GLOBAL}
    WSGIDaemonProcess foobar.com python-path=/u33/app/www/foobar/wsgi-scripts:/usr/lib/python2.7/site-packages:/u21/ewijaya/.anaconda/lib/python2.7/site-packages processes=2 threads=15 display-name=%{GROUP}
    WSGIProcessGroup foobar.com

    WSGIScriptAlias / /u33/app/www/foobar/wsgi-scripts/webframework/wsgi.py process-group=foobar.com
</VirtualHost>

【问题讨论】:

  • 2年后你找到方法了吗?

标签: apache file-upload httpd.conf


【解决方案1】:

虽然您的httpd.conf 中没有提到,但我假设您使用的是 SSL,正如错误消息所暗示的那样(端口 443)。在这种情况下,添加一个 SSLRenegBufferSize 指令,其中包含最大预期文件大小(以字节为单位),请参阅服务器故障上的 Request Entity Too Large error while uploading files of more than 128KB over SSL

【讨论】:

    猜你喜欢
    • 2018-10-16
    • 1970-01-01
    • 2017-03-23
    • 1970-01-01
    • 2012-04-28
    • 2012-06-09
    • 1970-01-01
    • 1970-01-01
    • 2018-02-01
    相关资源
    最近更新 更多