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

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company