How To Set Up Apache Centos Redhat

How To Set Up Apache

There are many ways to set up Apache on a VPS. We will be doing it through Webmin. If you don’t have Webmin installed on you VPS please go to this tutorial and see how to do it.  In order to have your website appear, you have to have a nameserver point the domain to your IP number. If you need to set up your own nameserver then please go to this tutorial. Your domain will not come up unless there is a nameserver telling requests to go to the IP number your Apache configuration is pointing it to.  You can host one or thousands of sites with just one IP number.

We will start by going to our Webmin control panel and logging in.  Then go to the menu on the left and select “Un-used Modules” , then “Apache Webserver” .  You should see a screen like this:

If Apache is not installed on your server click the link on the page that says “Click Here”  and YUM will install the server software and all it’s dependencies for you. When Apache and all it’s dependencies complete the install process scroll to the bottom of the page and click the “Return to Apache Webserver” button.

Now click the “Create virtual host” tab at the top of the page.

For “Port” click the empty text field and input 80.

You may either type in the path to your domain directory or click the browse icon.  My site,, in located at /home/oscar/

For “Server Name” tick the blank field selection and put in your domain name, mine is

Click the “Create Now” button and you will be taken to your Apache Webserver page listing all of your virtual servers.

Click the icon next to the virtual server you just created like the picture above.

Click the “Networking and Addresses” button.

In the text box next to “Alternate virtual server names”  input *  In the picture I have *  .

Click the “Return to server index” button, scroll to the bottom of the page that appears, and click the “Return to server list” button.

Click the Apache Start icon (or apply changes if Apache is already running) at the top right hand side of the page. Your site should come up when you you type your domain name in to your browser. for me it would be .

Make sure you have already created the directory which your website is going to be in, usually  /home/username/  or /home/username/htdocs/ . You can do this by SSHing into your account or SFTPing into your account and creating the directories.

There are endless configuration settings in Apache, and this tutorial is just intended to get your page up and visible to the rest of the world.