mod_wsgi icon indicating copy to clipboard operation
mod_wsgi copied to clipboard

Adding LimitRequestFieldSizeBody directive into httpd.conf

Open parth-thakkar opened this issue 1 year ago • 3 comments

Hi Graham,

I am following the way "Installation into Python" , using mod_wsgi-express to start the Apache server. As mod_wsgi-express start-server path/to/wsgi.py --host 0.0.0.0 --port 8080 --python-path path/to/my/Django/project/module and it runs fine, but how can I add LimitRequestFieldSizeBody directive into the generated httpd.conf .

Thanks

parth-thakkar avatar Jun 26 '24 14:06 parth-thakkar

Run with the --help option and read about the --include-file option. That allows you to include a file as a snippet into the generated file.

GrahamDumpleton avatar Jun 27 '24 09:06 GrahamDumpleton

Hi Graham, Thanks for response, I have tried with the external config file with --include-file myexternal.conf, and in this myexternal.conf I have added the LimitRequestFiledSize along with other configuration related to Kerberos. Though Kerberos configuration is pickedup from this external file but LimitRequestFieldSize does not come in effect.

What I tried after that is, once httpd.conf is generated then I manually added LimitRequestFieldSize into the generated httpd.conf on top and removed it from myexternal.conf which is my external config file added with --include-file. and now with apachectl stop/start , the LimitRequestFieldSize comes in effect.

So, it appears that this specific config was not picked up from external config file myexternal.conf but when I removed the config from myexternal.conf and manually added it into httpd.conf on top it came in effect.

This forces me to change the httpd.conf file manually which I want to avoid and let httpd.conf generated automatically everytime with the mod_wsgi express command.

Could you please see here another way of adding LimitRequestFieldSize using the mod_wsgi way into httpd.conf.

Many Thanks Parth

parth-thakkar avatar Jun 27 '24 13:06 parth-thakkar

Try using the --header-buffer-size option instead. For daemon mode this may take priority if is for same thing.

GrahamDumpleton avatar Jun 27 '24 20:06 GrahamDumpleton