0

Background

Please let me know if this question is more appropriate for serverfault...

I am currently in the process of installing a custom SSL certificate directly on my Elastic Beanstalk EC2 instance (via .ebextensions of course).

After lengthy research I was able to get it working, however, in the solution that originally pointed me in the correct direction, there is some Apache configuration that doesn't quite make sense to me and I would like to know a) what it is doing, and b) whether or not I need it.

My Configuration

My ssl.conf currently looks like this:

LoadModule ssl_module modules/mod_ssl.so
Listen 443

<VirtualHost *:443>

  <Proxy *>
        Order deny,allow
        Allow from all
  </Proxy>

  SSLEngine on
  SSLCertificateFile "/tmp/server.crt"
  SSLCertificateKeyFile "/tmp/server.key"

  SSLVerifyClient require
  SSLVerifyDepth 1
  SSLCACertificateFile "/tmp/origin-pull-ca.pem"

  ProxyPass / http://localhost:8080/ retry=0
  ProxyPassReverse / http://localhost:8080/
  ProxyPreserveHost on

  LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
  ErrorLog /var/log/httpd/elasticbeanstalk-error_log
  TransferLog /var/log/httpd/elasticbeanstalk-access_log

</VirtualHost>

My Problem

Note the following lines:

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

ProxyPass / http://localhost:8080/ retry=0
ProxyPassReverse / http://localhost:8080/
ProxyPreserveHost on

These are causing the following error on my web server:

[proxy_http:error] [pid 28341] [client 141.101.98.246:10392] AH01114: HTTP: failed to make connection to backend: localhost [proxy:error]

[pid 28343] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed [proxy_http:error] [pid 28343]

[client 141.101.107.128:14358] AH01114: HTTP: failed to make connection to backend: localhost, referer: https://example.com/

Once I commented out these lines, the webserver behaves as expected. As a result, I would like to know what these lines do, and whether or not it is save to remove them?

Additional Information

I forgot to mention, my Elastic Beanstalk instance is a single instance without a load balancer. I mention this because I believe that the Apache Proxy is something to do with the Load Balancer...

Your Answer

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

Browse other questions tagged or ask your own question.