What's the best way to set LimitRequestBody after Apache has been configured

397 views
Skip to first unread message

Gregory Gundersen

unread,
Jul 21, 2015, 7:05:26 PM7/21/15
to modwsgi
I am using mod_wsgi-express inside a Docker container. Currently, I am using a bash file and sed to do a find/replace on httpd.conf once it's built, but it seems hacky. Here is what I have:

adduser --disabled-password --gecos '' r
cd /g2e/
mod_wsgi-express setup-server wsgi.py --port=80 --user r --group r --server-root=/etc/g2e --socket-timeout=600
chmod a+x /etc/g2e/handler.wsgi
chown -R r /g2e/g2e/static/
sed -i "s/LimitRequestBody 10485760/LimitRequestBody 2048000000/g" /etc/g2e/httpd.conf
/etc/g2e/apachectl start
tail -f /etc/g2e/error_log

Is this a good way or is there something more straightforward?

Graham Dumpleton

unread,
Jul 21, 2015, 7:10:50 PM7/21/15
to mod...@googlegroups.com
Use the —limit-request-body option to mod_wsgi-express to change it.

    optparse.make_option('--limit-request-body', type='int', default=10485760,
            metavar='NUMBER', help='The maximum number of bytes which are '
            'allowed in a request body. Defaults to 10485760 (10MB).’),

You can see the full options by running:

    mod_wsgi-express setup-server —help

Graham

Gregory Gundersen

unread,
Jul 21, 2015, 7:35:16 PM7/21/15
to mod...@googlegroups.com
Great. Thank you for the quick reply!
--
You received this message because you are subscribed to a topic in the Google Groups "modwsgi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modwsgi/Sf-SjNm2j9A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages