0

I am trying to proxy an http service running on the same machine using apache proxy pass. When I try to connect to my subdomain.domain.com, I am redirected to 127.0.0.1, which is the address that I am trying to proxy with apache. It used to work on an older version of apache, then I updated the whole system and stopped working. The machine is running debian 8 and the last version of Apache2.

Here you can see my configuration for the virtual host.

<IfModule mod_proxy.c>
<VirtualHost *:443>
ServerName subdomain.domain.com
ServerAlias www.subdomain.domain.com
SSLProxyEngine On
SSLProxyCheckPeerExpire off
SSLProxyCheckPeerCN off
SSLProxyVerify none
ProxyPass / http://127.0.0.1:8888/
ProxyPassReverse / http://127.0.0.1:8888/
SSLEngine on
SSLCertificateFile /etc/apache2/myssl/subdomain.domain.crt
SSLCertificateKeyFile /etc/apache2/myssl/subdomain.domain.key

<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>

</VirtualHost>
</IfModule>
2
  • Please clarify. How is it 'not working'? Do you get an error message? If so, post it. Do you see something in the logs? If so, post it. etc. Sep 24, 2015 at 19:28
  • When I try to connect to my subdomain.domain.com, I am redirected to 127.0.0.1, which is the address that I am trying to proxy with apache, instead of getting the address 127.0.0.1:8888 proxied.
    – giovi321
    Sep 25, 2015 at 7:15

1 Answer 1

1

When this happened to me, the solution was the following: You must add

ProxyPreserveHost on

You must log in to answer this question.

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