Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wildmanonline committed May 9, 2024
1 parent 1c6233a commit f36a935
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ The Apache HTTP Web Server — usually just called Apache — is one of the most

1. Update your system:

sudo apt update && sudo apt upgrade
```command
sudo apt update && sudo apt upgrade
```

{{< note >}}
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with `sudo`. If you’re not familiar with the `sudo` command, see the [Linux Users and Groups](/docs/guides/linux-users-and-groups/) guide.
Expand All @@ -53,6 +55,7 @@ This guide is written for a non-root user. Commands that require elevated privil
```command
sudo systemctl enable apache2
```

## Managing Apache

### Apache Service
Expand Down Expand Up @@ -100,6 +103,7 @@ The Apache service runs on `systemd`, which can be used to manage the Apache ser
```command
sudo systemctl reload apache2
```
### Apache Modules
Apache can be extended and modified with modules. These range from modules that integrate interpreters like PHP and Python, enabling dynamic content, to modules that change Apache's fundamental model for handling connections. (See the next section for more on the latter type of modules, called [Multi-processing Modules](/docs/guides/how-to-install-apache-ubuntu-2004/#multi-processing-modules)).
Expand Down Expand Up @@ -137,6 +141,7 @@ Apache modules are typically installed via the package manager. After that, you
```command
sudo apache2ctl -M
```

## Multi-processing Modules

Apache supports several models for handling connections through a particular kind of module: Multi-processing Modules (MPMs). On Ubuntu and many other Linux distributions, the `event` module is Apache's default MPM. This section provides an overview of each of the three MPMs available and gives you the necessary commands for using them.
Expand Down Expand Up @@ -180,6 +185,7 @@ This MPM is a multi-threaded hybrid. Like the `prefork` MPM, it consists of a pa
```command
sudo systemctl restart apache2
```

### Event Module

This MPM functions similarly to the `worker` MPM. However, it adds listener threads. These threads handle the task of waiting on incoming requests, which frees up worker threads to continue processing new requests.
Expand Down Expand Up @@ -272,4 +278,4 @@ This section walks you through setting up your own website using Apache. In doin
You should see your website's "Hello, World!" page.

![Example web page hosted on the Apache HTTP Web Server.](apache-example-website.png)
![Example web page hosted on the Apache HTTP Web Server.](apache-example-website.png)
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,14 @@ Apache supports *name-based virtual hosting*, which allows you to host multiple

Repeat this process for any other domains you host.

{{< note respectIndent=false >}}
If you would like to enable Perl support, add the following lines above the closing `</VirtualHost>` tag:

{{< file "/etc/apache2/sites-available/example.com.conf" aconf >}}
Options ExecCGI
AddHandler cgi-script .pl
{{< /note >}}

{{< /file >}}
{{< note >}}
If you would like to enable Perl support, add the following lines above the closing `</VirtualHost>` tag:

```file {title="/etc/apache2/sites-available/example.com.conf" lang="aconf"}
Options ExecCGI
AddHandler cgi-script .pl
```
{{< /note >}}

1. Create directories for your websites and websites' logs, replacing `example.com` with your own domain information:

Expand Down

0 comments on commit f36a935

Please sign in to comment.