Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HAProxy - one domain three webservers.

    Scheduled Pinned Locked Moved Cache/Proxy
    3 Posts 3 Posters 682 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sp00ky
      last edited by

      Hi,

      I've got a minor problem that I would like to have help with if its possible.
      Right now i've got 3 webservers at home that I can access with www.example.com:443, www.example.com:8920 and www.example.com:4041

      I would like to access them like this instead:

      • www.example.com/
      • www.example.com/server2
      • www.example.com/server3

      Ive been looking at HAProxy and reading some instructions but I cant find any that does what I want.
      Is it even possible to do this?

      1 Reply Last reply Reply Quote 0
      • N
        no_Legend
        last edited by

        Hi sp00ky,

        i found this in the haproxy docu http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7.2
        Did not try it now.

          acl url_static  path_beg         /static /images /img /css
           acl url_static  path_end         .gif .png .jpg .css .js
           acl host_www    hdr_beg(host) -i www
           acl host_static hdr_beg(host) -i img. video. download. ftp.
        
           # now use backend "static" for all static-only hosts, and for static urls
           # of host "www". Use backend "www" for the rest.
           use_backend static if host_static or host_www url_static
           use_backend www    if host_www
        
        1 Reply Last reply Reply Quote 0
        • A
          Antonius
          last edited by

          Good question!

          Ive been looking at HAProxy and reading some instructions

          I would like to find the same example for  Squid Reverse proxy!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.