Skip to content

Lab08Apache

echadbourne edited this page Oct 20, 2023 · 12 revisions

Apache default root directory: /var/www/html

As with any new box I started by plugging it into the LAN, turning it on, and changing the root password, as well as making a named wheel account. I then logged out of root and into my named account, did a sudo -i, and opened the nmtui application to start IP configuration.

I set the IP configuration as follows:

  • IP address: 10.0.5.4
  • Gateway: 10.0.5.2
  • DNS Server: 10.0.5.6

I then disabled root ssh in the /etc/ssh/sshd_config file by changing PermitRootLogin from yes to no

I also made a record in the AD server, and checked that everything worked.

Running Apache

I installed httpd with yum install httpd when elevated to root

I configured the firewall with:

  • firewall-cmd --add-service=http --permanent - allows http through the firewall
  • firewall-cmd --add service=https --permanent - allows https through the firewall
  • firewall-cmd --reload

Then I started the service: systemctl start httpd

To test that this was working I connected to http://web01-elizabeth/ and I got the test page.

I removed the welcome page from /etc/httpd/conf.d/welcome.conf

And made my own welcome message that said "Welcome to Beth's Web Server!! (please work)" and it did! This is what the index.html file looked like:

<!DOCTYPE html>

<html>

<body>

Welcome to Beth's Web Server!

</body>

`

Clone this wiki locally