![]() ![]() The public_html directory contains the content that will be served to your visitors. ![]() Your document root, the top-level directory that Apache looks at to find content to serve, will be set to individual directories under the /var/Within each of these directories, you will create a public_html directory. The first step is to create a directory structure that will hold the site data that you will be serving to visitors. Step 1 - Creating the Directory Structure This will allow you to validate your configuration even though your content won’t be available to other visitors through the domain name. Step 6 of this tutorial will show you how to test and configure your test values. Note: If you do not have domains available at this time, you can use test values locally on your computer. You can learn how by completing steps 1-3 on our How To Install the Apache Web Server on Ubuntu 20.04 tutorial. You can use our Initial Server Setup with Ubuntu 20.04 guide to set this up. An Ubuntu 20.04 server with a non-root user with sudo privileges.Prerequisitesīefore you begin this tutorial, you will need: During this process, you’ll learn how to serve different content to different visitors depending on which domains they are requesting by creating two virtual host sites. In this guide, you will set up Apache virtual hosts on an Ubuntu 20.04 server. This scheme is expandable without any software limit as long as your server can handle the load. This is done without indicating to the visitor that the same server is also responsible for other sites. Each domain or individual site that is configured using Apache will direct the visitor to a specific directory holding that site’s information. Using virtual hosts, one Apache instance can serve multiple websites. Within this modular design, you can create an individual site or domain called a virtual host. Apache server configuration does not take place in a single monolithic file, but instead happens through a modular design where new files can be added and modified as needed. The Apache HTTP server is a popular open-source web server that offers flexibility, power, and widespread support for developers.
0 Comments
Leave a Reply. |