How To Set Up An Apache Web Server In 3 Easy Steps

apache logo   How To Set Up An Apache Web Server In 3 Easy StepsWhatever 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

fedora apache server installation   How To Set Up An Apache Web Server In 3 Easy Steps
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

fedora apache config installation   How To Set Up An Apache Web Server In 3 Easy Steps
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

fedora apache config main   How To Set Up An Apache Web Server In 3 Easy Steps
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.

fedora apache config virtualhosts   How To Set Up An Apache Web Server In 3 Easy Steps
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.

fedora apache config virtualhost settings   How To Set Up An Apache Web Server In 3 Easy Steps
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.

fedora apache config performance   How To Set Up An Apache Web Server In 3 Easy Steps
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):

fedora apache testpage   How To Set Up An Apache Web Server In 3 Easy Steps
If not, you may have done something wrong in your configuration or not started Apache yet.

Conclusion

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!

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

3 Comments -

Anonymous

If anyone was looking for a guide independent of OS, look into XAMPP.

Anonymous

I’ve done this some time ago, but it was on a Ubuntu 11.04 Server Edition, so I had to do everything via CLI. I still remember… “sudo apt-get install apache2″ :)

Johnfahlsing

As a win xp user, I was ablt to do something simular with servuftp, not bad, just a file sharinf place. Wondered all along if it was possible to run a server on a broadband2go usb device? Still searching…

Old BBS systems we’re the greatest, kinda miss the old sysop days.