Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: [FIXED] Apache as a reverse proxy from HTTPS to HTTPS |
|
Author |
|
vasileiosg
Joined: 22 Feb 2016 Posts: 5 Location: NL,Voorburg
|
Posted: Mon 28 Mar '16 15:13 Post subject: [FIXED] Apache as a reverse proxy from HTTPS to HTTPS |
|
|
Hello,
I have been struggling a lot with this matter. I have a service running on HTTPS on an internal server and I want to proxy to this server from outside. I thought it would have been as easy as doing the same for HTTP, but it seems I was wrong.
Please have a look on my vhost and if you have any ideas what am i doing wrong, please tell me!
<VirtualHost *>
ServerName something.domain.com
SSLCertificateFile /etc/apache2/ssl.crt/certificate.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/certificate.key
SSLProxyEngine On
ProxyPreserveHost on
ProxyPass / http://mail.domain.com/
ProxyPassReverse / http://mail.domain.com/
ProxyRequests on
SSLEngine on
ProxyPass / https://mail.domain.com/
ProxyPassReverse / https://mail.domain.com/
</VirtualHost>
Thanks in advance
Last edited by vasileiosg on Thu 31 Mar '16 12:46; edited 1 time in total |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 29 Mar '16 11:50 Post subject: |
|
|
You can not have two different Proxy*Pass to the same location in one vhost.
use https OR http, but not both. |
|
Back to top |
|
vasileiosg
Joined: 22 Feb 2016 Posts: 5 Location: NL,Voorburg
|
Posted: Tue 29 Mar '16 13:13 Post subject: |
|
|
Didn't know that, thanks!
I tried also separating them to two different files (one for HTTP and the other for HTTPS)
That worked, but for some reason, it disables all other vhost files.
Here is the file
<VirtualHost *:443>
ServerName something.domain.com
SSLCertificateFile server.crt
SSLCertificateKeyFile server.key
ProxyRequests Off
SSLEngine On
ProxyPreserveHost On
ProxyPass / https://mail.domain.com/
ProxyPassReverse / https://mail.domain.com/
</VirtualHost> |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
vasileiosg
Joined: 22 Feb 2016 Posts: 5 Location: NL,Voorburg
|
Posted: Thu 31 Mar '16 12:45 Post subject: |
|
|
i found the error:
<VirtualHost *:443>
should be:
<VirtualHost *> |
|
Back to top |
|
|
|
|
|
|