How to redirect multiple domain to same ip but different port for different services [duplicate]How to use DNS/Hostnames or Other ways to resolve to a specific IP:PortHow do I redirect subdomains to a different port on the same server?Apache VirtualHosts on port 8080, but what about the /etc/hosts?How can I make nginx use port 8080 instead of 80?what is the correct config for ubuntu apache2 virtualhost on port different from 80Can I use Varnish to front 2 different services from different servers on 1 domain?Need to know how to route non 80 port to a sub domainHow to redirect traffic from port 80 to port 8080How to route requests between Nginx servers on the same IP address based on domain name?Serving different secure sites based on port on same domain using nginxSSL for multiple ports with single domain - ubuntu with nginx

Future enhancements for the finite element method

How to properly maintain eye contact with people that have distinct facial features?

shutdown at specific date

How did early x86 BIOS programmers manage to program full blown TUIs given very few bytes of ROM/EPROM?

Why does the 6502 have the BIT instruction?

Apparent Ring of Craters on the Moon

Looking after a wayward brother in mother's will

Employer demanding to see degree after poor code review

How to capture more stars?

What does uniform continuity mean exactly?

How to prevent bad sectors?

Is this story about US tax office reasonable?

How does an ARM MCU run faster than the external crystal?

Why did this prime-sequence puzzle not work?

How could Catholicism have incorporated witchcraft into its dogma?

Windows 10 Programs start without visual Interface

Ticket sales for Queen at the Live Aid

What does the behaviour of water on the skin of an aircraft in flight tell us?

Is there an explanation for Austria's Freedom Party virtually retaining its vote share despite recent scandal?

Uses of T extends U?

What does "Marchentalender" on the front of a postcard mean?

Question about exercise 11.5 in TeXbook

Were pen cap holes designed to prevent death by suffocation if swallowed?

What's the connection between "kicking a pigeon" and "how a bill becomes a law"?



How to redirect multiple domain to same ip but different port for different services [duplicate]


How to use DNS/Hostnames or Other ways to resolve to a specific IP:PortHow do I redirect subdomains to a different port on the same server?Apache VirtualHosts on port 8080, but what about the /etc/hosts?How can I make nginx use port 8080 instead of 80?what is the correct config for ubuntu apache2 virtualhost on port different from 80Can I use Varnish to front 2 different services from different servers on 1 domain?Need to know how to route non 80 port to a sub domainHow to redirect traffic from port 80 to port 8080How to route requests between Nginx servers on the same IP address based on domain name?Serving different secure sites based on port on same domain using nginxSSL for multiple ports with single domain - ubuntu with nginx






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0
















This question already has an answer here:



  • How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

    8 answers



In my VM, i'm running both apache2 and nginx, but apache2 is pointed to Port 8080 and nginx is Port 80. Already i pointed my domain to ip in nginx and its running properly. The same thing i need to do for apache2. But how will i give Port number while mapping the ip to Domain. In the cName record, i'm not able to specify the port. Is there any alternative way to resolve this issues.










share|improve this question













marked as duplicate by Gerald Schneider, Thomas, chicks, womble May 15 at 22:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 2





    You can't. DNS doesn't handle ports.

    – Gerald Schneider
    May 15 at 7:39

















0
















This question already has an answer here:



  • How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

    8 answers



In my VM, i'm running both apache2 and nginx, but apache2 is pointed to Port 8080 and nginx is Port 80. Already i pointed my domain to ip in nginx and its running properly. The same thing i need to do for apache2. But how will i give Port number while mapping the ip to Domain. In the cName record, i'm not able to specify the port. Is there any alternative way to resolve this issues.










share|improve this question













marked as duplicate by Gerald Schneider, Thomas, chicks, womble May 15 at 22:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 2





    You can't. DNS doesn't handle ports.

    – Gerald Schneider
    May 15 at 7:39













0












0








0









This question already has an answer here:



  • How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

    8 answers



In my VM, i'm running both apache2 and nginx, but apache2 is pointed to Port 8080 and nginx is Port 80. Already i pointed my domain to ip in nginx and its running properly. The same thing i need to do for apache2. But how will i give Port number while mapping the ip to Domain. In the cName record, i'm not able to specify the port. Is there any alternative way to resolve this issues.










share|improve this question















This question already has an answer here:



  • How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

    8 answers



In my VM, i'm running both apache2 and nginx, but apache2 is pointed to Port 8080 and nginx is Port 80. Already i pointed my domain to ip in nginx and its running properly. The same thing i need to do for apache2. But how will i give Port number while mapping the ip to Domain. In the cName record, i'm not able to specify the port. Is there any alternative way to resolve this issues.





This question already has an answer here:



  • How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

    8 answers







apache-2.2 nginx azure subdomain mapping






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 15 at 7:37









Sakthi PanneerselvamSakthi Panneerselvam

1105




1105




marked as duplicate by Gerald Schneider, Thomas, chicks, womble May 15 at 22:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Gerald Schneider, Thomas, chicks, womble May 15 at 22:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 2





    You can't. DNS doesn't handle ports.

    – Gerald Schneider
    May 15 at 7:39












  • 2





    You can't. DNS doesn't handle ports.

    – Gerald Schneider
    May 15 at 7:39







2




2





You can't. DNS doesn't handle ports.

– Gerald Schneider
May 15 at 7:39





You can't. DNS doesn't handle ports.

– Gerald Schneider
May 15 at 7:39










1 Answer
1






active

oldest

votes


















1














DNS CNAME record resolves only to IP address, so you cannot specify port, you have to explicitly add port to your URL in a request like this: http://example.com:8080.



Another approach is to use load balancer like for example Haproxy, Traefic, or even Nginx with its reverse proxy capabilities (check this: http://nginx.org/en/docs/http/load_balancing.html). Then you will be able to use only one port (well, you can use multiple ports as well, but typically port 80 and 443) on its frontend traffic and "routing" it to your backends by some criteria (domain name, path, HTTP header info, cookies, source or destination IP address, etc.).






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    DNS CNAME record resolves only to IP address, so you cannot specify port, you have to explicitly add port to your URL in a request like this: http://example.com:8080.



    Another approach is to use load balancer like for example Haproxy, Traefic, or even Nginx with its reverse proxy capabilities (check this: http://nginx.org/en/docs/http/load_balancing.html). Then you will be able to use only one port (well, you can use multiple ports as well, but typically port 80 and 443) on its frontend traffic and "routing" it to your backends by some criteria (domain name, path, HTTP header info, cookies, source or destination IP address, etc.).






    share|improve this answer



























      1














      DNS CNAME record resolves only to IP address, so you cannot specify port, you have to explicitly add port to your URL in a request like this: http://example.com:8080.



      Another approach is to use load balancer like for example Haproxy, Traefic, or even Nginx with its reverse proxy capabilities (check this: http://nginx.org/en/docs/http/load_balancing.html). Then you will be able to use only one port (well, you can use multiple ports as well, but typically port 80 and 443) on its frontend traffic and "routing" it to your backends by some criteria (domain name, path, HTTP header info, cookies, source or destination IP address, etc.).






      share|improve this answer

























        1












        1








        1







        DNS CNAME record resolves only to IP address, so you cannot specify port, you have to explicitly add port to your URL in a request like this: http://example.com:8080.



        Another approach is to use load balancer like for example Haproxy, Traefic, or even Nginx with its reverse proxy capabilities (check this: http://nginx.org/en/docs/http/load_balancing.html). Then you will be able to use only one port (well, you can use multiple ports as well, but typically port 80 and 443) on its frontend traffic and "routing" it to your backends by some criteria (domain name, path, HTTP header info, cookies, source or destination IP address, etc.).






        share|improve this answer













        DNS CNAME record resolves only to IP address, so you cannot specify port, you have to explicitly add port to your URL in a request like this: http://example.com:8080.



        Another approach is to use load balancer like for example Haproxy, Traefic, or even Nginx with its reverse proxy capabilities (check this: http://nginx.org/en/docs/http/load_balancing.html). Then you will be able to use only one port (well, you can use multiple ports as well, but typically port 80 and 443) on its frontend traffic and "routing" it to your backends by some criteria (domain name, path, HTTP header info, cookies, source or destination IP address, etc.).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 15 at 11:44









        patokpatok

        5331314




        5331314













            Popular posts from this blog

            How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

            What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

            Why did Thanos need his ship to help him in the battle scene?Which actor plays Thanos in the Avengers mid-credits scene?Are there economic implications portrayed in comics where the buildings and cities are ruined almost daily?Old X-Men comic where team travels to alien world with a ring-like sun that needs recharging?Why does Ego need help sleeping?Is there an objective answer to who “the strongest Avenger” is?How did Banner get unstuck?Why did Thanos get hit?How did Thanos (or anyone) know the Infinity Stones would give him this power?Did Thanos leave Eitri alive for his after-sales service?In Avengers 1, why does Thanos need Loki?