Skip to main content

Posts

Showing posts from August, 2018

Apache - Host 2 Websites on the same IP and Port

The apache webserver is currently (at the date of writing this (08/2018)) the most popular web server for serving content on the internet. The Functionality we'll look at in this article is called 'Virtual Hosts'. A virtual host is essential another domain running on the same server instance of apache. For this demonstration, I'm going to use a CentOS 7.5. First, update your system: [archy@websrv ~]$ sudo yum -y update Next install apache on the server: [archy@websrv ~]$ sudo yum -y install httpd By default, the webserver will not start on boot so we'll change that and start it for now: [archy@websrv ~]$ sudo systemctl enable httpd.service [archy@websrv ~]$ sudo systemctl start httpd.service By now your webserver is already serving the default-welcome page. This can be checked by curl or simply pointing your browser to the server's address. But since I don't have any firewall-rules set up yet, I'm going to use cur