# Creating an Apache installation for local testing

> Install the Apache web server in a local AlmaLinux virtual machine so you can test websites before going live.

Source: https://helpcenter.ruachost.com/developers/web-development/creating-an-apache-installation-for-local-testing/

This guide explains how to install the Apache web server locally for testing and development.

### Important

These instructions assume you have already created a virtual machine running AlmaLinux on your local computer.

### Installing Apache

Apache is a widely used open-source web server and is commonly used on ruachost.com servers. It is a reliable choice for your testing environment.

#### Steps

1. Start your virtual machine and log in as the root user.
2. Install Apache by typing the following command:

```
yum install httpd
```

*Tip: `httpd` stands for "HTTP daemon"—this is Apache.*

3. At the `Is this ok` prompt, type `y` and press Enter to begin the installation.
4. After installation, start the Apache service:

```
systemctl start httpd
```

5. Confirm that Apache is running:

```
systemctl status httpd
```

You should see output similar to:

```
Active: active (running)
```

6. To ensure Apache starts automatically on system boot:

```
systemctl enable httpd
```

You now have a working Apache web server on your local virtual machine.

For more information on configuring Apache, see the [official Apache documentation](https://httpd.apache.org/docs).
