Вы находитесь на странице: 1из 8

Preston Chamberlin

ITIS 2110L-L01
Apache Web Server
Lab 08

11-08-2015
Introduction
Lab 08s goal was to get ourselves familiar with Apache, basic scripts, utilizing directory changes and
displaying web files through the server. Lab 8 utilizes Debian and Cent OS virtual machines, apache
software, VI text editor, and an internet browser.

Lab Results
Script one test and results: ./netconfig.sh eth0

root@pChamberlinDebian:~# ./netconfig.sh eth0


ifdown: interface eth0 not configured
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:30:d8:8c
Sending on LPF/eth0/08:00:27:30:d8:8c
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 172.16.1.254
DHCPACK from 172.16.1.254
RTNETLINK answers: File exists
bound to 172.16.1.140 -- renewal in 2324 seconds.
root@pChamberlinDebian:~#

interfaces file:

# This file describes the network interfaces available on your system


# and how to activate them. For more information, see interfaces(5).

# The loopback network interface


auto lo
iface lo inet loopback
#new definition of eth0
iface eth0 inet dhcp
address 172.16.136.10
netmask 255.255.255.0
auto eth0

resolv.conf file:

domain hades.lab
search hades.lab
nameserver 172.16.1.252
nameserver 172.16.1.245
nameserver 172.16.1.219

Script two test and results:

./go.sh static

root@pChamberlinDebian:/home# ./go.sh static


Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:30:d8:8c
Sending on LPF/eth0/08:00:27:30:d8:8c
Sending on Socket/fallback
DHCPRELEASE on eth0 to 172.16.1.254 port 67
Static interfaces loaded!

./go.sh dhcp

root@pChamberlinDebian:/home# ./go.sh dhcp


DHCP interfaces loaded!
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:30:d8:8c
Sending on LPF/eth0/08:00:27:30:d8:8c
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 172.16.1.254
DHCPACK from 172.16.1.254
bound to 172.16.1.140 -- renewal in 2577 seconds.

./go.sh dog

root@pChamberlinDebian:/home# ./go.sh dog


Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/08:00:27:30:d8:8c
Sending on LPF/eth0/08:00:27:30:d8:8c
Sending on Socket/fallback
DHCPRELEASE on eth0 to 172.16.1.254 port 67
Parameter must be static or dhcp
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:30:d8:8c
Sending on LPF/eth0/08:00:27:30:d8:8c
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 172.16.1.254
DHCPACK from 172.16.1.254
bound to 172.16.1.140 -- renewal in 2253 seconds.

./go2.sh

root@pChamberlinDebian:/home# ./go2.sh
Two parameters must be passed, the state and the NIC id

./go2.sh static eth0

root@pChamberlinDebian:/home# ./go2.sh static eth0


Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:30:d8:8c
Sending on LPF/eth0/08:00:27:30:d8:8c
Sending on Socket/fallback
DHCPRELEASE on eth0 to 172.16.1.254 port 67

./go2.sh statics eth0

root@pChamberlinDebian:/home# ./go2.sh statics eth0


cp: cannot stat `/etc/network/interfaces.statics': No such file
or directory

./go2.sh static eth9


root@pChamberlinDebian:/home# ./go2.sh static eth9
ifdown: interface eth9 not configured
Ignoring unknown interface eth9=eth9.

Ice weasel localhost

/etc/apache2/
There is a list of files and folders inside the location /etc/apache2/
/var/www
Lists the index.html file

Step 2 show your directory structure and content


I was unable to move them to /apachelab/itis2110 using the cp command and network file locations.
Step 3: Newly edited localhost Index page

Step 4: Testing forbidden permissions


Step 5: Cent OS

Summary
Lab 08 was overall pretty straightforward. The lab taught me a lot about how apache works and browser
permissions. The use of scripts made some tasks very easy, however first you must make the script,
which can be a bit tricky. I had a few issues copying the web files from the server location to the new
directory, so step 2 I was unable to complete. However, I did have access to them. Apart from this
everything went smoothly and I had no issues. Using the CLI to install packages was also very simple. It
can be tedious at times, but it makes up for it with its efficiency.

Вам также может понравиться