Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.
Whatever the reason is, you may at some point want to get a web server going. Whether you want to give yourself remote access to certain pages or services, you want to get a community group going, or anything else, you’ll need to have the right software installed and configured for that to happen. So how exactly can you do that? It’s actually quite simple.
My operating system of choice for this article will be Fedora Linux, as Linux in general is known for getting servers up and running quickly, and easily. In addition, Fedora is well supported by both a community and a corporation, has great security, and offers graphical configuration tools for multiple servers.
Step One: Installation
New Install of Fedora
If you don’t have Fedora installed on your system yet, you can do so with the DVD because you can also choose to install Apache at the same time. If you take this route, while installing from the DVD you’ll be able to choose which packages you want to install with the “Customize Now” switch. Choose it and then under the Servers tab, you can select “Web Server”. Go ahead with the installation until you can boot into your new system. From there, you can install the graphical configuration tool by choosing the package system-config-httpd from your package manager, or run sudo yum install system-config-http.
Fedora Already Installed
If you already have Fedora installed, you can install both the web server and the graphical configuration tool. You can install the httpd and system-config-httpd packages from the package manager, or run sudo yum install httpd system-config-httpd.
Step Two: Configuration
You can now start the graphical configuration tool from System Tools –> HTTP. The first tab you’ll see is the Main tab, where you can configure the server name, administrator email address, and under which addresses the server is available under. I recommend that you add an address right now, and choose “All available addresses” on port 80 for simplicity.
The second tab contains the different virtual hosts, or the number of different websites on the same server, that are configured. The server can differentiate what domain name was entered into the browser and therefore choose the correct virtual host when displaying a page.
There are plenty of different settings that you can choose for each virtual host, including the necessary components as well as hard-to-configure ones such as SSL (HTTPS). For a majority of items, the graphical configuration tool should be able to take care of your needs.
The final tab has everything to do with performance and the amount of connections that are allowed. There are no recommended settings as each server has different capabilities, so if you have a larger website you’ll need to play around with these numbers and see what works (provided that you have enough traffic to test out the settings correctly).
Additional Needed Configuration
Before you can actually access your new web server, you’ll need to open your terminal and then run sudo service httpd start to actually start Apache and sudo chkconfig httpd on to make Apache start at every boot.
Step Three: Testing
Step 3 in our process is simply to test out whether you can access your page or not. On the same machine, open up Firefox and type in localhost or 127.0.0.1 to see if you get this test page (provided that you didn’t change the document root):
If not, you may have done something wrong in your configuration or not started Apache yet.
It’s pretty cool to have Apache up and running on your very system, considering that it’s the same technology being used by most of the websites you visit every single day (including MakeUseOf). If you want other machines to have access, you’ll need to go into Fedora’s firewall configuration utility (installed by default) and make sure that HTTP (Port 80) is open. Also, if you want to run more complicated web frameworks such as forums or WordPress, you’ll have to install MySQL and PHP as well, but I’ll leave that for another article.
How easy do you think this process is? What do you like or not like about Apache? Let us know in the comments!