
Now create a new index file, /var/Hello World - Again Notice that the second website is simply a second html directory in the same /var/www directory as the first site. Create a new website directory structure with the following command: html]# mkdir -p /var/www/html2 Now you are ready to set up the second website.

Press the “Q” key, followed by “Y” to exit the Lynx web browser. You can see that the revised content for the original website is displayed and that there are no obvious errors. H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search =history list Once you have your site, add the following stanza to the bottom of its /etc/httpd/conf/nf configuration file (adding this stanza is the only change you need to make to the nf ~]# systemctl restart ~]# lynx Hello WorldĬommands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back.Īrrow keys: Up and Down to move. If you do not have an existing website, go back and create one now. Preparing the original websiteīefore you set up a second website, you need to get name-based virtual hosting working for the existing site. In this article, I'll pick up where we left off in the previous article, so you'll need to set up the original website, a name-based virtual website. This requires only a little more configuration than for a single site.Įven if you are starting with only a single website, I recommend that you set it up as a virtual host, which will make it easier to add more sites later. Modern web servers, including Apache, use the hostname portion of the specified URL to determine which virtual web host responds to the page request. With name-based virtual hosting, you can use a single IP address for multiple websites. The data for the websites is located in /var/Name-based virtual hosting If you have another distribution or release of Fedora, the commands you will use and the locations and content of the configuration files may be different.Īs my previous article mentioned, all of the configuration files for Apache are located in /etc/httpd/conf and /etc/httpd/conf.d. Note: I wrote this article on a virtual machine using Fedora 27 with Apache 2.4.29.
Apache directory studio debian how to#
In this post, I will show you how to serve multiple websites using a single instance of Apache. In my last post, I explained how to configure an Apache web server for a single website. Running Kubernetes on your Raspberry Pi.A practical guide to home automation using open source tools.6 open source tools for staying organized.

