SlideShare a Scribd company logo
Working with Apache Web Server
Time Required: 35 minutes
Objective: Explore basic settings and tasks in Apache Web Server.
Description: Without a doubt, youll run across Apache Web Server systems when conducting a
security test. Because Apache is a sophisticated, modular Web server, mastering its features and
options can take considerable time. Apaches layout varies, depending on the OS. For example,
Apache in Fedora Linux is different from Apache in Ubuntu Linux. In this activity, you explore
basic Apache Web Server commands and learn how to find and modify some configuration
options (called Apache directives). The goal of this activity is to configure a Web server with a
directory that requires authentication.
1.
Boot your computer into Linux with the Kali Linux DVD.
2.
Open a Terminal shell. At the command prompt, type apache2ctl start and press Enter. You can
safely ignore the Could not reliably determine the servers fully qualified domain name error.
3.
Start the Iceweasel Web browser. In the address bar, type localhost and press Enter. The Web
site displays instructions on how to manipulate the default apache configuration. Read over this
page.
4.
Open a Terminal shell. At the command prompt, type apache2ctl stop and press Enter.
5.
Now, well view the default apache configuration files. In the Terminal shell, type cd/etc/apache2
and press Enter to change directories. Then type grep Include apache2.conf and press Enter to
see a listing of files and directories where the Apache server searches for additional directives at
startup (see Figure 10-5). Note the next to last line, IncludeOptional sites-enabled/*.conf. This
directory is where Apache checks for Web site configuration files. You can add a Web site by
adding its configuration file in this directory without having to change the main configuration
file apache2.conf.
Figure 10-5
Viewing files and directories with an Include statement
Source: GNU GPL
6.
Type cd /etc/apache2/sites-enabled && ls and press Enter.
7.
Open the file in the gvim editor by typing gvim 000-default.conf and pressing Enter.
8.
Enter the following lines at the end of the file, below the line :
9.
Save your changes and exit the gvim editor by pressing Esc, typing :wq, and pressing Enter.
10.
In the Terminal shell, create a new directory by typing mkdir /var/www/html/restricted and
pressing Enter.
11.
Type cd /var/www/html/restricted to change to the directory you created in Step 12 and press
Enter. Then type touch secret.txt and press Enter to create a file in this directory.
12.
Next, you create the .htaccess file in the same directory. This file is the local directory
configuration file specified in apache2.conf by the AccessFileName directive. If .htaccess exists
in any Web site directory, Apache checks it first. In this .htaccess file, you point Apache to the
location of AuthUserFile (essentially, a password file). Type gvim.htaccess and press Enter.
Type the following for the files contents:
13.
Exit and save the file by pressing Esc and then pressing : (a colon). At the : prompt, type wq and
press Enter. In the Terminal shell, create a password file by typing htpasswd -c
/etc/apache2/.htpasswd tester and pressing Enter. When prompted, enter a password and confirm,
and then make note of the password. The .htaccess file you created in Step 12 tells Apache to
look in the .htpasswd file for the tester users password. You can run the command
cat/etc/apache2/.htpasswd to view the password hash for your new user.
14.
Restart Apache by typing apache2ctl restart and pressing Enter. In Iceweasel, go to
http://localhost/restricted, and enter the username tester and the password you confirmed in Step
13. What file is displayed? If you want to be prompted again for a password, youll have to close
and reopen your browser.
15.
See whether others in the class can access your restricted folder by having them enter
http://yourIPaddress/restricted in their browsers (replacing yourIPaddress with your IP address).
If necessary, type ifconfig eth0 and press Enter to find your IP address.
16.
Why is entering your credentials on a Web site not secured with SSL, such as this site, a
problem? What is the fix for this problem?
17.
Close the Terminal shell, exit Firefox, and log off Linux for the next activity.
Question 14 and 16

More Related Content

Similar to Working with Apache Web ServerTime Required 35 minutesObjective.pdf

Apache Web Server Setup 2
Apache Web Server Setup 2Apache Web Server Setup 2
Apache Web Server Setup 2
Information Technology
 
Linux apache installation
Linux apache installationLinux apache installation
Linux apache installationDima Gomaa
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
Chetan Soni
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
usha kannappan
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
kamarul kawnayeen
 
Apache installation and configurations
Apache installation and configurationsApache installation and configurations
Apache installation and configurationsNikhil Jain
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
HARRY CHAN PUTRA
 
Apache windows
Apache windowsApache windows
Apache windows
mexxixxo
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
عطاءالمنعم اثیل شیخ
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
Alfred Ayache
 
Installing Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for WindowsInstalling Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for Windows
Jonathan Bloom
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
Manish Jain
 

Similar to Working with Apache Web ServerTime Required 35 minutesObjective.pdf (20)

instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Apache Web Server Setup 2
Apache Web Server Setup 2Apache Web Server Setup 2
Apache Web Server Setup 2
 
Linux apache installation
Linux apache installationLinux apache installation
Linux apache installation
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
 
Apache
ApacheApache
Apache
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
 
Apache installation and configurations
Apache installation and configurationsApache installation and configurations
Apache installation and configurations
 
Apache
ApacheApache
Apache
 
Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
 
Apache windows
Apache windowsApache windows
Apache windows
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
Installing Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for WindowsInstalling Hortonworks Hadoop for Windows
Installing Hortonworks Hadoop for Windows
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
 
Proxy
ProxyProxy
Proxy
 
Apache
ApacheApache
Apache
 

More from amikoenterprises

Within MySQL Workbench, create a new table. This table will be used .pdf
Within MySQL Workbench, create a new table. This table will be used .pdfWithin MySQL Workbench, create a new table. This table will be used .pdf
Within MySQL Workbench, create a new table. This table will be used .pdf
amikoenterprises
 
Within the unethical leadership presentation, I talked a lot about t.pdf
Within the unethical leadership presentation, I talked a lot about t.pdfWithin the unethical leadership presentation, I talked a lot about t.pdf
Within the unethical leadership presentation, I talked a lot about t.pdf
amikoenterprises
 
Write a C program to create two user-defined functions; first functi.pdf
Write a C program to create two user-defined functions; first functi.pdfWrite a C program to create two user-defined functions; first functi.pdf
Write a C program to create two user-defined functions; first functi.pdf
amikoenterprises
 
Write a C# program that demonstrate your multi-level inheritance und.pdf
Write a C# program that demonstrate your multi-level inheritance und.pdfWrite a C# program that demonstrate your multi-level inheritance und.pdf
Write a C# program that demonstrate your multi-level inheritance und.pdf
amikoenterprises
 
With reference to the above case, please answer all of the followi.pdf
With reference to the above case, please answer all of the followi.pdfWith reference to the above case, please answer all of the followi.pdf
With reference to the above case, please answer all of the followi.pdf
amikoenterprises
 
WR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdf
WR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdfWR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdf
WR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdf
amikoenterprises
 
without using truth table Unit I Logic and Proofs Question 1. Is.pdf
without using truth table  Unit I Logic and Proofs Question 1. Is.pdfwithout using truth table  Unit I Logic and Proofs Question 1. Is.pdf
without using truth table Unit I Logic and Proofs Question 1. Is.pdf
amikoenterprises
 
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdfWilliam Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
amikoenterprises
 
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdfWord facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
amikoenterprises
 
wo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdfwo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdf
amikoenterprises
 
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdfWittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
amikoenterprises
 
Write the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdfWrite the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdf
amikoenterprises
 
Write the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdfWrite the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdf
amikoenterprises
 
Write the class named Student which has the following data members.pdf
Write the class named Student  which has the following data members.pdfWrite the class named Student  which has the following data members.pdf
Write the class named Student which has the following data members.pdf
amikoenterprises
 
Write program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdfWrite program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdf
amikoenterprises
 
Write notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdfWrite notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdf
amikoenterprises
 
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdfWrite it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
amikoenterprises
 
Write MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdfWrite MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdf
amikoenterprises
 
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdfWilliam es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
amikoenterprises
 
write clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdfwrite clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdf
amikoenterprises
 

More from amikoenterprises (20)

Within MySQL Workbench, create a new table. This table will be used .pdf
Within MySQL Workbench, create a new table. This table will be used .pdfWithin MySQL Workbench, create a new table. This table will be used .pdf
Within MySQL Workbench, create a new table. This table will be used .pdf
 
Within the unethical leadership presentation, I talked a lot about t.pdf
Within the unethical leadership presentation, I talked a lot about t.pdfWithin the unethical leadership presentation, I talked a lot about t.pdf
Within the unethical leadership presentation, I talked a lot about t.pdf
 
Write a C program to create two user-defined functions; first functi.pdf
Write a C program to create two user-defined functions; first functi.pdfWrite a C program to create two user-defined functions; first functi.pdf
Write a C program to create two user-defined functions; first functi.pdf
 
Write a C# program that demonstrate your multi-level inheritance und.pdf
Write a C# program that demonstrate your multi-level inheritance und.pdfWrite a C# program that demonstrate your multi-level inheritance und.pdf
Write a C# program that demonstrate your multi-level inheritance und.pdf
 
With reference to the above case, please answer all of the followi.pdf
With reference to the above case, please answer all of the followi.pdfWith reference to the above case, please answer all of the followi.pdf
With reference to the above case, please answer all of the followi.pdf
 
WR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdf
WR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdfWR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdf
WR Grace Company fue fundada por, s�, un hombre llamado WR Grace. Er.pdf
 
without using truth table Unit I Logic and Proofs Question 1. Is.pdf
without using truth table  Unit I Logic and Proofs Question 1. Is.pdfwithout using truth table  Unit I Logic and Proofs Question 1. Is.pdf
without using truth table Unit I Logic and Proofs Question 1. Is.pdf
 
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdfWilliam Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
William Short is chief executive officer (CEO) of Benton Memorial Ho.pdf
 
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdfWord facilita el formato de texto usando negrita, cursiva y subrayad.pdf
Word facilita el formato de texto usando negrita, cursiva y subrayad.pdf
 
wo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdfwo populations of beetles have different reproductive organs that ar.pdf
wo populations of beetles have different reproductive organs that ar.pdf
 
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdfWittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
Wittes Tasty Fishes� Wittes Tasty Fishes� is an aquaculture compan.pdf
 
Write the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdfWrite the necessary SQL Queries for the following functions.A,Addi.pdf
Write the necessary SQL Queries for the following functions.A,Addi.pdf
 
Write the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdfWrite the necessary SQL Queries for the following functions.A. Add.pdf
Write the necessary SQL Queries for the following functions.A. Add.pdf
 
Write the class named Student which has the following data members.pdf
Write the class named Student  which has the following data members.pdfWrite the class named Student  which has the following data members.pdf
Write the class named Student which has the following data members.pdf
 
Write program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdfWrite program in C language to sort the given array using merge sort.pdf
Write program in C language to sort the given array using merge sort.pdf
 
Write notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdfWrite notes on the following areas as related to tax investigations .pdf
Write notes on the following areas as related to tax investigations .pdf
 
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdfWrite it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
Write it in Assembly codeWrite it in Assembly codeWrite it in As.pdf
 
Write MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdfWrite MATLAB code to solve this summation in general, where you can .pdf
Write MATLAB code to solve this summation in general, where you can .pdf
 
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdfWilliam es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
William es due�o de un solo barco. El barco vale 200 millones de d�l.pdf
 
write clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdfwrite clear explanation please 4. Find the dimension and a basi.pdf
write clear explanation please 4. Find the dimension and a basi.pdf
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 

Working with Apache Web ServerTime Required 35 minutesObjective.pdf

  • 1. Working with Apache Web Server Time Required: 35 minutes Objective: Explore basic settings and tasks in Apache Web Server. Description: Without a doubt, youll run across Apache Web Server systems when conducting a security test. Because Apache is a sophisticated, modular Web server, mastering its features and options can take considerable time. Apaches layout varies, depending on the OS. For example, Apache in Fedora Linux is different from Apache in Ubuntu Linux. In this activity, you explore basic Apache Web Server commands and learn how to find and modify some configuration options (called Apache directives). The goal of this activity is to configure a Web server with a directory that requires authentication. 1. Boot your computer into Linux with the Kali Linux DVD. 2. Open a Terminal shell. At the command prompt, type apache2ctl start and press Enter. You can safely ignore the Could not reliably determine the servers fully qualified domain name error. 3. Start the Iceweasel Web browser. In the address bar, type localhost and press Enter. The Web site displays instructions on how to manipulate the default apache configuration. Read over this page. 4. Open a Terminal shell. At the command prompt, type apache2ctl stop and press Enter. 5. Now, well view the default apache configuration files. In the Terminal shell, type cd/etc/apache2 and press Enter to change directories. Then type grep Include apache2.conf and press Enter to see a listing of files and directories where the Apache server searches for additional directives at startup (see Figure 10-5). Note the next to last line, IncludeOptional sites-enabled/*.conf. This directory is where Apache checks for Web site configuration files. You can add a Web site by adding its configuration file in this directory without having to change the main configuration file apache2.conf. Figure 10-5 Viewing files and directories with an Include statement Source: GNU GPL 6.
  • 2. Type cd /etc/apache2/sites-enabled && ls and press Enter. 7. Open the file in the gvim editor by typing gvim 000-default.conf and pressing Enter. 8. Enter the following lines at the end of the file, below the line : 9. Save your changes and exit the gvim editor by pressing Esc, typing :wq, and pressing Enter. 10. In the Terminal shell, create a new directory by typing mkdir /var/www/html/restricted and pressing Enter. 11. Type cd /var/www/html/restricted to change to the directory you created in Step 12 and press Enter. Then type touch secret.txt and press Enter to create a file in this directory. 12. Next, you create the .htaccess file in the same directory. This file is the local directory configuration file specified in apache2.conf by the AccessFileName directive. If .htaccess exists in any Web site directory, Apache checks it first. In this .htaccess file, you point Apache to the location of AuthUserFile (essentially, a password file). Type gvim.htaccess and press Enter. Type the following for the files contents: 13. Exit and save the file by pressing Esc and then pressing : (a colon). At the : prompt, type wq and press Enter. In the Terminal shell, create a password file by typing htpasswd -c /etc/apache2/.htpasswd tester and pressing Enter. When prompted, enter a password and confirm, and then make note of the password. The .htaccess file you created in Step 12 tells Apache to look in the .htpasswd file for the tester users password. You can run the command cat/etc/apache2/.htpasswd to view the password hash for your new user. 14. Restart Apache by typing apache2ctl restart and pressing Enter. In Iceweasel, go to http://localhost/restricted, and enter the username tester and the password you confirmed in Step 13. What file is displayed? If you want to be prompted again for a password, youll have to close and reopen your browser. 15. See whether others in the class can access your restricted folder by having them enter http://yourIPaddress/restricted in their browsers (replacing yourIPaddress with your IP address).
  • 3. If necessary, type ifconfig eth0 and press Enter to find your IP address. 16. Why is entering your credentials on a Web site not secured with SSL, such as this site, a problem? What is the fix for this problem? 17. Close the Terminal shell, exit Firefox, and log off Linux for the next activity. Question 14 and 16