logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Virtual Host with X-Forwarded-Proto for HAproxy and SSH
Author
giopas



Joined: 18 Nov 2015
Posts: 29

PostPosted: Mon 11 Jan '16 19:14    Post subject: Virtual Host with X-Forwarded-Proto for HAproxy and SSH Reply with quote

Hi all,

I would need some support from an apache point of view to implement the solution in this article [1].

I have installed HAproxy, but I have not understood what/how to set a Virtual Host in apache (2.2.31) which would help in this situation.

In particular, I am not sure how to ensure 'X-Forwarded-Proto' is enabled and how to use it in such context.

Could someone please help me out with it please?

Thanks in advance,

giopas

[1] http://blog.chmd.fr/ssh-over-ssl-episode-4-a-haproxy-based-configuration.html
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 13 Jan '16 13:26    Post subject: Reply with quote

What has HAproxy todo with apache? That tutorial is about SSH and HAproxy and not apache.

What are you trying to do?
Back to top
giopas



Joined: 18 Nov 2015
Posts: 29

PostPosted: Wed 13 Jan '16 13:36    Post subject: Reply with quote

Humm, good question. Smile

As far as I understood from that tutorial, to accomplish that you would need HAproxy, openssh-server and Apache.

In particular, it would be necessary for Apache to support 'X-Forwarded-Proto' headers and then, I think, it would be necessary to create a Virtual Host to have a specific subdomain linked to it.

What it is also not clear to me is the fact that the article speak about port 80 and http but then it uses SSL on port 443.

It is very likely that I am missing something and I would like to understand if from Apache point of view there is something I should do or check (e.g. how to check if I have 'X-Forwarded-Proto' enabled?) or if there is nothing to do on Apache side.

Thanks JB for your support!

giopas
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 13 Jan '16 17:45    Post subject: Reply with quote

Well I did such a thing with the need of the HAproxy

https://mariobrandt.de/archives/technik/ssh-tunnel-bypassing-transparent-proxy-using-apache-170/
Back to top
giopas



Joined: 18 Nov 2015
Posts: 29

PostPosted: Wed 13 Jan '16 18:09    Post subject: Reply with quote

The difference in your solution is that you need to change proxy settings from client side. With HAproxy, as far as I have understood, all would be done at the server side.

Or I am misreading it?
Back to top


Reply to topic   Topic: Virtual Host with X-Forwarded-Proto for HAproxy and SSH View previous topic :: View next topic
Post new topic   Forum Index -> Apache