Apache 414 Request-URI Too Long
On an Apache server, when accessing a long URL, got 414 Request-URI Too Long
The error is because the URL is too long, this may be a bug with the web applications. If you pass so much data, you should consider using the HTTP POST method instead of GET request.
To fix this error, edit the apache config file, and add the following 2 lines
1 2 |
LimitRequestLine 40940 LimitRequestFieldSize 40940 |
On Debian/Ubuntu, create
1 |
vi /etc/apache2/conf.d/url-length.conf |
On RHEL based OS, create
1 |
vi /etc/httpd/conf.d/url-length.conf |
Add the following 2 lines
1 2 |
LimitRequestLine 40940 LimitRequestFieldSize 40940 |
Restart Apache
For Ubuntu/Debian
1 |
systemctl restart apache2 |
For RHEL/AlmaLinux/OracleLinux
1 |
systemctl restart httpd |