apachednswebdebianport80

How Do I Run Two Websites on Port 80 (accesible from 2 DNS records)


I want to run two websites on ONE apache installation running on Debian. I want both of my sites to be on port 80. They are both assigned to two different DNS records. When 123.456.78.901:80 is accessed from www.mcpvp.net, I want it to go to Site A. When 123.456.78.901:80 is accessed from www.pmcpvp.net, I want it to go to Site B.


Solution

  • You need to use apache VirtualHost in order to redirect traffic coming from certain DNS records to certain folders on your server.

    DigitalOcean's tutorial explains it well: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-8