Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4740

How to use HAProxy to change how users get repointed to our locally hosted websites

$
0
0

Hello Team,

I’m very new to using HAProxy but I’ve managed with some help to successfully setup HAProxy version 1.8.15 on my CentOS 8 server. I have within my /etc/haproxy/haproxy.cfg file added in the required frontend and backend entries to point to various webapps our office hosts locally:

Sites are examples below and not real domains we own.

frontend front_mysites
        mode http
        bind 10.101.0.10:443 ssl crt /etc/pki/tls/certs/star_cert.crt
        option httplog
        log     global

        use_backend back_nextcloud if { hdr(host) -i mycloud.myoffice.com }
        use_backend back_mail if { hdr(host) -i mymail.myoffice.com }

backend back_nextcloud
        mode    http
        option  forwardfor
        option  http-server-close
        http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
        server nextcloud-01 10.101.0.11:443 check ssl verify none

backend back_mail
        mode    http
        option  forwardfor
        option  http-server-close
        http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload;
        server webtop-01 10.101.0.12:443 check ssl verify none

Typcially we access our locally hosted sites using something like the following addresses:

mymail.myoffice.com/webtop
mycloud.myoffice.com/nextcloud

What I would like to have happen instead is our users type in the following addresses to access our websites and not have them enter in the name after the /:

mymail.myoffice.com
mycloud.myoffice.com

Can our HAProxy be configured to assist us so that when a user types in for example mymail.myoffice.com they are redirected to mymail.myoffice.com/webtop?

Thank you in advance for any advice you can provide me.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>