Resolving IP addresses that correspond to multiple domain names

glinka

I understand the process by which an IP address is obtained from a domain name, contacting the hierarchy of name servers until an address is returned, but when an IP address corresponds to multiple domain names, how is the request resolved? If I set up an Apache server, is there a method by which it would be able to distinguish these different domains?

Gary Schreiner

When you reverse-resolve an IP it will come back to it's PTR record in the zone, which there is only one. So for example www.google.com

Non-authoritative answer:
Name:    www.google.com
Addresses:  2607:f8b0:4007:800::1010
          74.125.224.242
          74.125.224.244
          74.125.224.240
          74.125.224.241
          74.125.224.243

but 74.125.224.242 reverse resolves back to:

Name:    lax04s08-in-f18.1e100.net
Address:  74.125.224.242

and not www.google.com.

===

The apache server itself listens on an ip address independent of the hostnames attached to the ip, using the Listen directive in the config file. Apache just wants to hear data coming across port 80 on that IP.

Listen *:80 <-- listen on all adapters (127.0.0.1 and all network IPs)

or

Listen AAA.BBB.CCC.DDD:80 <-- listen on a specific adapter..

When you set up your virtual hosts Apache is able to pull the hostname from the headers and send it over to the right DocumentRoot to handle the pages you are presenting with that hostname.

Example:

<VirtualHost *:80>
    ServerName www.server.com
    ServerAlias server.com
    DocumentRoot "c:\htdocs\wwwroot"
</VirtualHost>

<VirtualHost *:80>
    ServerName www.server2.com
    DocumentRoot "c:\htdocs\wwwroot2"
</VirtualHost>

Hope this helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How To Resolve IP Addresses To Domain Names?

From Dev

Multiple IP addresses and Host Names used by Spark Driver and Master

From Dev

Resolving DNS names on non-domain PCs

From Dev

Resolving pseudo domain name to private IP

From Dev

Domain Resolving To Wrong IP Using DNSMASQ

From Dev

Resolving IP address to get Domain Name

From Dev

Prestashop multiple domain names

From Dev

How to achieve resolving of the same hostname to different IP addresses based on location

From Dev

tcpdump with multiple dst IP addresses?

From Dev

Split pcap on multiple IP addresses

From Dev

Split pcap on multiple IP addresses

From Dev

Multiple ip addresses in single string

From Dev

Utility iptables lists host names and not IP addresses

From Dev

validate host names and IP addresses with single regex

From Dev

Compare Multiple IP Addresses to Multiple CIDRS in R

From Dev

What limitations and risks regarding assigning multiple domain names (PTR) for single IP

From Dev

Apache Virtual Host Mix IP and domain names

From Dev

How to send a DatagramPacket to multiple ip addresses?

From Dev

Multiple docker containers, IP addresses, VM, OSX

From Dev

Multiple IP addresses through the same interface and iptables

From Dev

Import multiple IP addresses within an array as object

From Dev

How to Assign Multiple IP Addresses and Subnets to Bind?

From Dev

SSH and ufw from multiple ip addresses

From Dev

Condition for multiple variable (validating IP addresses)

From Dev

Defining Static IP addresses for Multiple NIC adapters

From Dev

Excel Lookup IP addresses in multiple ranges

From Dev

How to set up multiple IP addresses?

From Dev

Prepending a ‘.’ to each domain name in a list but skip raw IP addresses

From Dev

How can I realize a domain resolve to 2 IP addresses?

Related Related

  1. 1

    How To Resolve IP Addresses To Domain Names?

  2. 2

    Multiple IP addresses and Host Names used by Spark Driver and Master

  3. 3

    Resolving DNS names on non-domain PCs

  4. 4

    Resolving pseudo domain name to private IP

  5. 5

    Domain Resolving To Wrong IP Using DNSMASQ

  6. 6

    Resolving IP address to get Domain Name

  7. 7

    Prestashop multiple domain names

  8. 8

    How to achieve resolving of the same hostname to different IP addresses based on location

  9. 9

    tcpdump with multiple dst IP addresses?

  10. 10

    Split pcap on multiple IP addresses

  11. 11

    Split pcap on multiple IP addresses

  12. 12

    Multiple ip addresses in single string

  13. 13

    Utility iptables lists host names and not IP addresses

  14. 14

    validate host names and IP addresses with single regex

  15. 15

    Compare Multiple IP Addresses to Multiple CIDRS in R

  16. 16

    What limitations and risks regarding assigning multiple domain names (PTR) for single IP

  17. 17

    Apache Virtual Host Mix IP and domain names

  18. 18

    How to send a DatagramPacket to multiple ip addresses?

  19. 19

    Multiple docker containers, IP addresses, VM, OSX

  20. 20

    Multiple IP addresses through the same interface and iptables

  21. 21

    Import multiple IP addresses within an array as object

  22. 22

    How to Assign Multiple IP Addresses and Subnets to Bind?

  23. 23

    SSH and ufw from multiple ip addresses

  24. 24

    Condition for multiple variable (validating IP addresses)

  25. 25

    Defining Static IP addresses for Multiple NIC adapters

  26. 26

    Excel Lookup IP addresses in multiple ranges

  27. 27

    How to set up multiple IP addresses?

  28. 28

    Prepending a ‘.’ to each domain name in a list but skip raw IP addresses

  29. 29

    How can I realize a domain resolve to 2 IP addresses?

HotTag

Archive