0

I have a reverse proxy HTTPd (EC2) and Elastic Search Service (AWS) and a i want to redirect my requests (without simple rewriting the urls because Elasticsearch service is not accessible from outside) from Httpd to ElasticSearch service

So configured my Httpd like this :

ProxyPass /elasticsearch/ https://MyelasticSearchLongUrl.es.amazonaws.com
ProxyPassReverse /elasticsearch/  https://MyelasticSearchLongUrl.es.amazonaws.com

but the problem is my httpd generate an error:

ProxyPass worker hostname (MyelasticSearchLongUrl.es.amazonaws.com ) too long httpd.service: main process exited, code=exited, status=1/FAILURE kill: cannot find process "" httpd.service: control process exited, code=exited status=1 Failed to start The Apache HTTP Server. Unit httpd.service entered failed state. httpd.service failed.

Is there a solution to change the httpd configuration specially URL limit length ?

2

No, there is a hardcoded limit of 96 characters for the worker name that was introduced in 2.4. There is a bug about that, but given its age of more than 5 years in state "NEW", I suspect upstream doesn't care.

The workaround is, as you say, to use RewriteRule [P] instead. Be careful if you have a complex setup that mixes locally-served files (Alias), RewriteRule and Redirect, because it's possible that moving from ProxyPass to RewriteRule changes the order in which things are executed.

0

Unlike the earlier answer, the bug https://bz.apache.org/bugzilla/show_bug.cgi?id=53218 referred to the total worker name, not the hostname as specified by the OP, and was allowed to be truncated as of v2.4.12 of httpd.

The worker hostname being limited is a different bug, and is covered here: https://bz.apache.org/bugzilla/show_bug.cgi?id=62085

This second bug is fixed, and has been backported to v2.4.30.

Proposed for fixing in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1750356

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.