Lab 07 ‐ Apache Lab - rune-seregina/sys-255-fa24 GitHub Wiki

Objective
Using prior knowledge about Linux, I configured a new Rocky Linux VM on my environment. The role of this machine is a web server, so I configured a basic web page to be able to be accessed via hostname. I also used RealMD to add a Linux Machine to my Windows Active Directory environment.

Vocab:

  • Apache: a free, open-source HTTP web server
  • PHP: Hypertext Pre-Processer, scripting language for dynamic webpage content
  • RealMD: provides Active Directory for Linux

Resources used:


IP Assignments:

  • WAN IP (synonymous with fw interface 1/em0): 10.0.17.112/24
  • LAN IP (synonymous with fw interface 2/em1): 10.0.5.2/24
  • wks02-rune IP: 10.0.5.150/24 (or as assigned by DHCP)
  • wks02/ad02/dhcp02/fs01/web01 default gateway: 10.0.5.2/24
  • wks02/dhcp02/fs01/web01 dns: 10.0.5.6
  • ad02-rune ip: 10.0.5.6/24
  • dhcp02-rune ip: 10.0.5.4/24
  • fs01-rune ip: 10.0.5.8/24
  • web01-rune ip: 10.0.5.10/24

Accounts:

  • ad02-rune: rune\Administrator (password A)
  • rune.local: rune.seregina (password A)
  • rune.local: rune.seregina-adm (password A)
  • rune.local: alice (password A)
  • rune.local: bob (password A)
  • dhcp-1-rune: rune (password A)
  • fs01-rune: Administrator (password B)
  • web01-rune: rune (password A)

SSH Security

  • nano/vi /etc/ssh/sshd_config
  • PermitRootLogin yes > no
  • systemctl restart sshd

Configuring httpd/php

  • yum install -y dhcpd
  • firewall-cmd --add-service=http --permanent
  • firewall-cmd --add-service=https --permanent
  • firewall-cmd --reload
  • systemctl enable httpd
  • systemctl start httpd
  • cd /var/www/html
  • vi index.html
  • Welcome to the web01-rune web server!
  • dnf install php
  • systemctl restart httpd
  • cd /var/www/html
  • vi index.php
  • basic php script:
  • < ?php echo "HELLO SYS255</ br>";
    for ($x=1; $x <= 10; $x++)
    {
    echo "X is now: $x</ br>";
    }
    ?>

Using RealMD


Troubleshooting

  • No troubleshooting here!

Reflection
This lab was helpful in gaining confidence navigating Linux in terms of configuration and web hosting. The introduction of tools such as realmd and php will likely be helpful in the future.

⚠️ **GitHub.com Fallback** ⚠️