I am trying to host two sites using Apache from the same Ubuntu server. I have one IP address and I have only one domain (which resolves the ip address). Therefore, I want domain name queries to give one website and request an ip address to give to another.
I have symbolic links in / etc / apache 2 / sites-enabled for two files indicating the configuration for my two sites.
One contains:
<VirtualHost 1.2.3.4:80>
ServerName 1.2.3.4
stuff
</VirtualHost>
while the other contains
<VirtualHost domain.net:80>
ServerName domain.net
stuff
</VirtualHost>
However, when I start Apache, I get the following message:
[warn] VirtualHost 1.2.3.4:80 overlaps with VirtualHost domain.net:80, the first has precedence, perhaps you need a NameVirtualHost directive
and when I point my browser to any domain or 1.2.3.4, I get a site that I want to associate with an IP address.
, , IP-, -. ( .)
, , , ip, , . NameVirtualHost, , , , , IP-.
, .
( , - - Rails-, Passenger, , .)