Need help? Chat now!
Search results for:
Table of Contents
Although Hostwinds offers many turnkey services such as Shared Web Hosting, Business Web Hosting, Cloud VPS, and Dedicated Servers for hosting your website, there may be a scenario where you would want to create your own web server and install the Operating System.
This guide will cover installing Apache Web Service to your Hostwinds Cloud VPS or Dedicated Server and assuming that you have root or sudo access to your server and a Hostwinds Cloud VPS or Dedicated Server and can log in to your server using SSH.
We highly recommend that you create a user with sudo privileges to follow this guide.
You can install Apache server on Red Hat-based distros such as CentOS or Fedora using the following command:
dnf -y httpd
On a Debian-based distribution such as Ubuntu or Debian, you would install it like this:
apt-get -y install apache 2
The Apache webserver service is called httpd on Red Hat-based distros like CentOS and Fedora, while it is called apache2 in Debian-based distros such as Debian or Ubuntu.
Enter these commands to start your Apache service and to enable it on boot for CentOS:
systemctl start httpd systemctl enable httpd
Enter these commands to start your Apache service and to enable it on boot for Debian based servers:
systemctl start apache2 systemctl enable apache2
To check if your service is running, use the following command for CentOS or Fedora:
systemctl status httpd
To check if your service is running, use the following command for Debian or Ubuntu:
systemctl status apache2
The next step is to open your browser and type in:
If you at not sure how to find your server's IP Address, this guide may be helpful: https://www.hostwinds.com/guide/how-to-find-your-vps-ip-address/
If your installation has gone well, you should see your HTML homepage.
You will want to add your files, including your default index.html, here:
The Apache configuration files are in this directory:
On Debian based systems such as Ubuntu, you would find it in this file:
Written by Hostwinds Team / October 16, 2019