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 ?

  • I resolved the problem by adding RewriteRule ^/elasticsearch(.*)$ MyelasticSearchLongUrl.es.amazonaws.com/$1 [P]
    – MrGildarts
    Jan 30, 2018 at 9:04
  • I have similar problem, I tried, <VirtualHost *:443> RedirectMatch "myALB" "internal-xxxxxxxxxx.elb.amazonaws.com" <IfModule mod_proxy.c> ProxyPass / myALB:443 retry=1 acquire=3000 timeout=600 Keepalive=On ProxyPassReverse / myALB:443 </IfModule> . I dont see the messages going ALB. Did I miss anything?
    – Daniel
    Apr 9, 2020 at 5:52

3 Answers 3


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.

  • Fixed in version 2.4.7 Mar 16, 2021 at 18:22

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


I had this issue on a Centos 7.4.1708 with Apache HTTPD 2.4.46 compiled from source, I found that running a yum update to bring the OS and related packages up to date resolved this issue without an Apache recompile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .