How to install Apache from source code

To install the latest version of Apache Web Server from source code, go to the apache website, download the latest source code .tar.gz file.

https://httpd.apache.org/download.cgi

At the time of writing this, the latest version was Apache HTTP Server 2.4.52.

If you get an error related to APR

Install APR with

For RHEL

For Ubuntu/Debian

To start Apache, use the command

To stop

Apache config files are located at

Create Apache Service file

?

Create file

Enable and start Apache service with

To enable Apache module, you can edit file /usr/local/apache/conf/httpd.conf

Here are sed commands to enable some common apache modules

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *