GrahamDumpleton / mod_wsgi

Source code for Apache/mod_wsgi.
Apache License 2.0
1.02k stars 268 forks source link

Adding LimitRequestFieldSizeBody directive into httpd.conf #889

Open parth-thakkar opened 2 weeks ago

parth-thakkar commented 2 weeks ago

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

GrahamDumpleton commented 2 weeks ago

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.

parth-thakkar commented 2 weeks ago

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

GrahamDumpleton commented 2 weeks ago

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