1

I am quite a newbie in the field of server configuration. At work we want to setup a Maven repository with Apache Archiva, basically we want a place in which store the Maven projects we create. I am able to run Archiva on localhost and to access it via http. To be able to access to the repository via SSL, we wanted to configure Apache to act as a SSL proxy, I followed many guides (e.g. https://stackoverflow.com/questions/30871001/how-to-setup-apache-archiva-to-use-https-instead-of-http) on how to do that but the answer I get when I try to connect via https is

An error occurred during a connection to server_ip:8080. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

My Virtual Host configuration looks like this:

Listen 8081
<VirtualHost *:8081>
    ServerName server_ip
    ProxyRequests Off
    <Proxy http://localhost:8080>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPreserveHost On
    SSLEngine On
    SSLProxyEngine On
    SSLCertificateFile /path_to_cert
    SSLCertificateKeyFile /path_to_key
    ProxyPass /http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
</VirtualHost>

How can I solve the issue?

  • You (and maybe the tutorial you read) misspelled ProxyPassReverse. – Amani Kilumanga Nov 17 '16 at 5:16
  • 1
    @AmaniKilumanga my fault, I was copying this part from another machine and I made a spelling mistake, I'll edit it... – Antonio La Marra Nov 17 '16 at 15:30
1

Other than the missing space in the line "ProxyPass /http://localhost:8080/" which I presume to be a copy/paste error (otherwise you server would not start), you only need "SSLProxyEngine On" when proxying to https, but you are pryxing to http, so you do not need this. Remove this directive and re-try, it should work.

Also you do not need the <Proxy http://localhost:8080 > block. These sorts of blocks are (almost) exclusively for configuring forward proxies, whereas you have a reverse proxy. They are very common across various 'guides' out on the internet, but they are not needed.

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.