+1 607 252-6647 Email Questions

How to configure an Apache web server

  • Published in News
  • Hits: 526

I have hosted my own websites for many years now. Since switching from OS/2 to Linux more than 20 years ago, I have used Apache[1] as my server software. Apache is solid, well-known, and quite easy to configure for a basic installation. It is not really that much more difficult to configure for a more complex setup, such as multiple websites.

Installation and configuration of the Apache web server must be performed as root. Configuring the firewall also needs to be performed as root. Using a browser to view the results of this work should be done as a non-root user. (I use the user student on my virtual host.)

Installation

Note: I use a virtual machine (VM) using Fedora 27 with Apache 2.4.29. If you have a different distribution or a different release of Fedora, your commands and the locations and content of the configuration files may be different. However, the configuration lines you need to modify are the same.

The Apache web server is easy to install. On my CentOS 6.x server, it just takes a simple yum command. It installs all the necessary dependencies if any are missing. I used the dnf command below on one of my Fedora virtual machines. The syntax for dnf and yum are the same except for the name of the command itself.

dnf -y install httpd

The VM is a very basic desktop installation I am using as a testbed for writing a book. Even on this system, only six dependencies were installed in under a minute.

All the configuration files for Apache are located in /etc/httpd/conf and /etc/httpd/conf.d. The data for the websites is located in /var/www

Read more from our friends at Opensource.com

Contact us

By Mail

PO Box 5613

Katy, TX 77491

USA

Social: twitter facebook

Phone: +1 607 252-6647

Fax: +1 866 573-1096

Email: info [AT] synapticweb [DOT] co