Logo       PBase-Foundation

Apache

Before Installing be sure the hostname and /etc/hosts are correct.

Check hostname

Make sure the target server's hostname command returns the fully qualified hostname and domainname. If needed, change it with:

hostnamectl set-hostname myhost1.myrealdomainname.net

Check /etc/hosts

Be sure the target server's /etc/hosts file is correct. In a DHCP environment your IP address may change on reboot and a hard-coded assigned address added to /etc/hosts may become stale.

Install Apache

The first step is to install the the pbase-repo RPM package. It places YUM repository specs into the target server's /etc/yum.repos.d/ directory. Once that bootstrapping step is done, all the other application components become available.

echo "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txt
yum -y install https://pbase-foundation.com/pbase-repo.rpm
yum -y install pbase-preconfig-apache
yum -y install pbase-apache
yum -y install pbase-preconfig-lets-encrypt
yum -y install pbase-lets-encrypt
yum -y install pbase-firewall-enable

If not already enabled NTP can be installed and started with:

yum -y install pbase-ntp-timesync

How to watch Apache server logs

When install is done, load the shell-aliases from /root/.bashrc and run the "tailhttpd" alias:

source ~/.bashrc
tailhttpd

Configuration Options

The pbase-preconfig-apache rpm creates a sample configuration file that can be customized:

{
"pbase_apache" : {
"addSelfToEtcHosts": false,
"addSecurityHeaders": true,
"restrictHttpMethods": true,
"useSitesEnabledConf": false,
"enableIndexPhp": false,
"serverAdmin": "yoursysadmin@yourrealmail.com"
}
}

More about Apache web server

Read more about the Apache.org project at:
https://httpd.apache.org/ABOUT_APACHE.html