Then, restart Apache and PHP-FPM service to apply the configuration changes: Options Indexes FollowSymLinks MultiViewsĮrrorLog $/_access.log combined
Next, you will need to create a virtual host configuration file for each website that indicate how the Apache web server will respond to various domain requests.įirst, create a virtual host configuration file for website: Then, change the ownership of both website directory to www-data:Ĭhown -R chown -R Create Virtual Configuration
Next, create a index.html file for website: To do so, create a index.html file for website: Mkdir /var/mkdir /var/Next, create sample website content for each website: Next, you will need to create a directory structure and sample content for each website.įirst, create a document root directory for both websites with the following command: You can check the Apache webserver status with the following command: Create Directory Structureīefore starting, make sure LAMP stack is installed on your VPS.
#Apache web server hosting how to
In this section, we will show you how to host two websites named and on a single Ubuntu VPS with Apache webserver. Configure Apache to Host Multiple Websites Note : You can refer the Webdock DNS Guide to learn how to manage your DNS records.
If you are looking for a guide for Nginx, click here. This article details how to configure Virtual Hosting for Apache.