How to set up vHosts in Apache - Knowledgebase

How to set up vHosts in Apache Print

  • apache, web server, httpd, vhosts, virtual hosts
  • 0

This guide is designed for people who followed our previous Apache webserver guide or you currently have Apache webserver installed and would like to set up multiple websites (vhosts) on your webserver.


Step 1 — Setting up vHosts

Step 2 — Create Directory File

<title>Hello World!</title>
<h1>This vHost is successfully working! Sweet.</h1>

Step 3 — Create vHosts

IncludeOptional sites-enabled/*.conf
<VirtualHost *:80>
ServerName www.website
ServerAlias website
DocumentRoot /var/www/website/html
ErrorLog /var/www/website/log/error.log
CustomLog /var/www/website/log/requests.log combined

Was this answer helpful?

« Back