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

    Different hostnames same ip destination

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 4 Posters 2.1k 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.
    • Z
      zleeper
      last edited by

      Hi,

      I've been looking around now sometime and tried to figure out if this is possible.

      If I access jboss.sub.int.domain.com I should be redirected to 10.10.10.30 port 8080
      and
      if I access app.sub.int.domain.com I should be redirected to 10.10.10.30 port 8442

      both of the hostnames have same IP (WAN int.)

      BR
      /zleeper

      1 Reply Last reply Reply Quote 0
      • K
        kejianshi
        last edited by

        I think not.

        1 Reply Last reply Reply Quote 0
        • Z
          zleeper
          last edited by

          thx for the quick answer, got another solution for my problem so! :D

          1 Reply Last reply Reply Quote 0
          • K
            kejianshi
            last edited by

            2 Public IPs?

            1 Reply Last reply Reply Quote 0
            • Z
              zleeper
              last edited by

              yeah :) easiest/quickest way of doing it :)

              1 Reply Last reply Reply Quote 0
              • K
                kathampy
                last edited by

                You need a reverse proxy server running on port 80. That is the only way for a single IP.

                1 Reply Last reply Reply Quote 0
                • K
                  kejianshi
                  last edited by

                  Reverse proxy would work if his links were like:

                  site1.name1.com
                  site2.name2.com

                  but I don't think it would do anything to separate simply name1.com from name2.com

                  But maybe I misunderstand how it works.

                  1 Reply Last reply Reply Quote 0
                  • K
                    kathampy
                    last edited by

                    @kejianshi:

                    Reverse proxy would work if his links were like:

                    site1.name1.com
                    site2.name2.com

                    but I don't think it would do anything to separate simply name1.com from name2.com

                    But maybe I misunderstand how it works.

                    The DNS names can be anything as long as they resolve to the reverse proxy server. The reverse proxy needn't "redirect" the browser to the actual ports either. The individual websites will be displayed directly according to the DNS name and on port 80.

                    1 Reply Last reply Reply Quote 0
                    • K
                      kejianshi
                      last edited by

                      So, I can run:

                      website1.com
                      website2.com
                      website3.com

                      on 1 IP and all will land you at different websites?

                      1 Reply Last reply Reply Quote 0
                      • K
                        kathampy
                        last edited by

                        Yes. Even with HTTPS.

                        1 Reply Last reply Reply Quote 0
                        • K
                          kejianshi
                          last edited by

                          Might give it a try one day when I have a use for it.  Thanks  ;D

                          1 Reply Last reply Reply Quote 0
                          • chpalmerC
                            chpalmer
                            last edited by

                            Look up virtual hosts as it applies to apache also.

                            We run one apache server with multiple websites.

                            http://httpd.apache.org/docs/2.2/vhosts/

                            Triggering snowflakes one by one..
                            Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

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