SlideShare a Scribd company logo
1 of 1
Explain the use of “directives” in configuration files. Provide an example of two directives found
in an Apache configuration file and detail what each accomplishes.
Solution
The configuration files contain directives that can be applied to the entire server, or they may be
restricted to apply only to particular directories, files, hosts, or URLs.
HTTP Server of Apache is configured by putting or placing directives in plain text configuration
files. Configuration file httpd.conf is called main configuration file. During compile time its
location is set, but command line flag -f is used if it's need to be overridden ever.Directive
"Include" is used to add other configuration files ,likewise wildcards can also be used to add
many configuration files.Any of these configuration files can be used to place any of the
directives,httpd is used to recognised if any of the changes is made in main configuration file
when it is started or restarted. The <If Define>directive encloses directives that will only be
applied if an appropriate parameter is defined on the httpdcommand line.
The < IfModule>directive is very similar, except it encloses directives that will only be applied if
a particular module is available in the server. The module must either be statically compiled in
the server, or it must be dynamically compiled and its LoadModule line must be earlier in the
configuration file. This directive should only be used if you need your configuration file to work
whether or not certain modules are installed. It should not be used to enclose directives that you
want to work all the time, because it can suppress useful error messages about missing modules.

More Related Content

Similar to Explain the use of directives in configuration files- Provide an examp.docx

Similar to Explain the use of directives in configuration files- Provide an examp.docx (20)

APACHE
APACHEAPACHE
APACHE
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
php
phpphp
php
 
php
phpphp
php
 
Apache HTTP Server
Apache HTTP ServerApache HTTP Server
Apache HTTP Server
 
Http
HttpHttp
Http
 
INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...
INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...
INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...
 
INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...
INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...
INSTALLING AND CONFIGURING APACHE TOOLKIT FOR SERVICEGUARD ...
 
Apache Presentation
Apache PresentationApache Presentation
Apache Presentation
 
R hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing HadoopR hive tutorial supplement 1 - Installing Hadoop
R hive tutorial supplement 1 - Installing Hadoop
 
Lecture 21 - Preprocessor and Header File
Lecture 21 - Preprocessor and Header FileLecture 21 - Preprocessor and Header File
Lecture 21 - Preprocessor and Header File
 
dylibencapsulation
dylibencapsulationdylibencapsulation
dylibencapsulation
 
Hadoop file
Hadoop fileHadoop file
Hadoop file
 
Apache Presentation
Apache PresentationApache Presentation
Apache Presentation
 
Hadoop file
Hadoop fileHadoop file
Hadoop file
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8
 
Apache - Mod-Rewrite
Apache - Mod-RewriteApache - Mod-Rewrite
Apache - Mod-Rewrite
 

More from james876543264

Astronomy 107- 1- Why does helium fusion require a higher temperature.docx
Astronomy 107- 1- Why does helium fusion require a higher temperature.docxAstronomy 107- 1- Why does helium fusion require a higher temperature.docx
Astronomy 107- 1- Why does helium fusion require a higher temperature.docxjames876543264
 
Astronomers have found dark matter in a variety of environments- Name.docx
Astronomers have found dark matter in a variety of environments- Name.docxAstronomers have found dark matter in a variety of environments- Name.docx
Astronomers have found dark matter in a variety of environments- Name.docxjames876543264
 
Assume that LO and HI have already been assigned as constants with LO.docx
Assume that LO and HI have already been assigned as constants with LO.docxAssume that LO and HI have already been assigned as constants with LO.docx
Assume that LO and HI have already been assigned as constants with LO.docxjames876543264
 
AS1- Four Condition of Deadloc- show that the four conditions of deadl.docx
AS1- Four Condition of Deadloc- show that the four conditions of deadl.docxAS1- Four Condition of Deadloc- show that the four conditions of deadl.docx
AS1- Four Condition of Deadloc- show that the four conditions of deadl.docxjames876543264
 
As we know- total ownership is not a requirement for consolidation- A.docx
As we know- total ownership is not a requirement for consolidation- A.docxAs we know- total ownership is not a requirement for consolidation- A.docx
As we know- total ownership is not a requirement for consolidation- A.docxjames876543264
 
Asset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docx
Asset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docxAsset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docx
Asset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docxjames876543264
 
Ashley Wesley is the assistant controller at the Walitin Construction.docx
Ashley Wesley is the assistant controller at the Walitin Construction.docxAshley Wesley is the assistant controller at the Walitin Construction.docx
Ashley Wesley is the assistant controller at the Walitin Construction.docxjames876543264
 
Assembly language --- Area of a Polygon program Write a program to fin.docx
Assembly language --- Area of a Polygon program Write a program to fin.docxAssembly language --- Area of a Polygon program Write a program to fin.docx
Assembly language --- Area of a Polygon program Write a program to fin.docxjames876543264
 
As a transportation planner-engineer- would you implement a bus servic.docx
As a transportation planner-engineer- would you implement a bus servic.docxAs a transportation planner-engineer- would you implement a bus servic.docx
As a transportation planner-engineer- would you implement a bus servic.docxjames876543264
 
explain why glass electrode is a good example of an ion selective elec.docx
explain why glass electrode is a good example of an ion selective elec.docxexplain why glass electrode is a good example of an ion selective elec.docx
explain why glass electrode is a good example of an ion selective elec.docxjames876543264
 
explain why galvanize steel does not rust Chlorine is added to swimmin.docx
explain why galvanize steel does not rust Chlorine is added to swimmin.docxexplain why galvanize steel does not rust Chlorine is added to swimmin.docx
explain why galvanize steel does not rust Chlorine is added to swimmin.docxjames876543264
 
Explain why in the DPCM structure- the input to the predictor P is the.docx
Explain why in the DPCM structure- the input to the predictor P is the.docxExplain why in the DPCM structure- the input to the predictor P is the.docx
Explain why in the DPCM structure- the input to the predictor P is the.docxjames876543264
 
explain Westminster system- explain Westminster system- explain We.docx
explain Westminster system-    explain Westminster system-  explain We.docxexplain Westminster system-    explain Westminster system-  explain We.docx
explain Westminster system- explain Westminster system- explain We.docxjames876543264
 
Explain what anSolutionAn intervention is a deliberate process by whic.docx
Explain what anSolutionAn intervention is a deliberate process by whic.docxExplain what anSolutionAn intervention is a deliberate process by whic.docx
Explain what anSolutionAn intervention is a deliberate process by whic.docxjames876543264
 
Explain what is meant by the statement that a preferred stock is a hyb.docx
Explain what is meant by the statement that a preferred stock is a hyb.docxExplain what is meant by the statement that a preferred stock is a hyb.docx
Explain what is meant by the statement that a preferred stock is a hyb.docxjames876543264
 
Explain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docx
Explain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docxExplain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docx
Explain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docxjames876543264
 
Explain two Principle of locality used in Memory Hierarchy-SolutionHie.docx
Explain two Principle of locality used in Memory Hierarchy-SolutionHie.docxExplain two Principle of locality used in Memory Hierarchy-SolutionHie.docx
Explain two Principle of locality used in Memory Hierarchy-SolutionHie.docxjames876543264
 
Explain the steps needed to configure RIPng and explain the advantages.docx
Explain the steps needed to configure RIPng and explain the advantages.docxExplain the steps needed to configure RIPng and explain the advantages.docx
Explain the steps needed to configure RIPng and explain the advantages.docxjames876543264
 
Explain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docxExplain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docxjames876543264
 
Explain the importance of using the typedef keyword then write a C ++.docx
Explain the importance of using the typedef keyword then write a C ++.docxExplain the importance of using the typedef keyword then write a C ++.docx
Explain the importance of using the typedef keyword then write a C ++.docxjames876543264
 

More from james876543264 (20)

Astronomy 107- 1- Why does helium fusion require a higher temperature.docx
Astronomy 107- 1- Why does helium fusion require a higher temperature.docxAstronomy 107- 1- Why does helium fusion require a higher temperature.docx
Astronomy 107- 1- Why does helium fusion require a higher temperature.docx
 
Astronomers have found dark matter in a variety of environments- Name.docx
Astronomers have found dark matter in a variety of environments- Name.docxAstronomers have found dark matter in a variety of environments- Name.docx
Astronomers have found dark matter in a variety of environments- Name.docx
 
Assume that LO and HI have already been assigned as constants with LO.docx
Assume that LO and HI have already been assigned as constants with LO.docxAssume that LO and HI have already been assigned as constants with LO.docx
Assume that LO and HI have already been assigned as constants with LO.docx
 
AS1- Four Condition of Deadloc- show that the four conditions of deadl.docx
AS1- Four Condition of Deadloc- show that the four conditions of deadl.docxAS1- Four Condition of Deadloc- show that the four conditions of deadl.docx
AS1- Four Condition of Deadloc- show that the four conditions of deadl.docx
 
As we know- total ownership is not a requirement for consolidation- A.docx
As we know- total ownership is not a requirement for consolidation- A.docxAs we know- total ownership is not a requirement for consolidation- A.docx
As we know- total ownership is not a requirement for consolidation- A.docx
 
Asset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docx
Asset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docxAsset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docx
Asset Depreciation 2 2 unread replies- 2 2 replies- Answer each of the.docx
 
Ashley Wesley is the assistant controller at the Walitin Construction.docx
Ashley Wesley is the assistant controller at the Walitin Construction.docxAshley Wesley is the assistant controller at the Walitin Construction.docx
Ashley Wesley is the assistant controller at the Walitin Construction.docx
 
Assembly language --- Area of a Polygon program Write a program to fin.docx
Assembly language --- Area of a Polygon program Write a program to fin.docxAssembly language --- Area of a Polygon program Write a program to fin.docx
Assembly language --- Area of a Polygon program Write a program to fin.docx
 
As a transportation planner-engineer- would you implement a bus servic.docx
As a transportation planner-engineer- would you implement a bus servic.docxAs a transportation planner-engineer- would you implement a bus servic.docx
As a transportation planner-engineer- would you implement a bus servic.docx
 
explain why glass electrode is a good example of an ion selective elec.docx
explain why glass electrode is a good example of an ion selective elec.docxexplain why glass electrode is a good example of an ion selective elec.docx
explain why glass electrode is a good example of an ion selective elec.docx
 
explain why galvanize steel does not rust Chlorine is added to swimmin.docx
explain why galvanize steel does not rust Chlorine is added to swimmin.docxexplain why galvanize steel does not rust Chlorine is added to swimmin.docx
explain why galvanize steel does not rust Chlorine is added to swimmin.docx
 
Explain why in the DPCM structure- the input to the predictor P is the.docx
Explain why in the DPCM structure- the input to the predictor P is the.docxExplain why in the DPCM structure- the input to the predictor P is the.docx
Explain why in the DPCM structure- the input to the predictor P is the.docx
 
explain Westminster system- explain Westminster system- explain We.docx
explain Westminster system-    explain Westminster system-  explain We.docxexplain Westminster system-    explain Westminster system-  explain We.docx
explain Westminster system- explain Westminster system- explain We.docx
 
Explain what anSolutionAn intervention is a deliberate process by whic.docx
Explain what anSolutionAn intervention is a deliberate process by whic.docxExplain what anSolutionAn intervention is a deliberate process by whic.docx
Explain what anSolutionAn intervention is a deliberate process by whic.docx
 
Explain what is meant by the statement that a preferred stock is a hyb.docx
Explain what is meant by the statement that a preferred stock is a hyb.docxExplain what is meant by the statement that a preferred stock is a hyb.docx
Explain what is meant by the statement that a preferred stock is a hyb.docx
 
Explain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docx
Explain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docxExplain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docx
Explain the weaknesses of the OOA-OOD focusing only on Use-cases and C.docx
 
Explain two Principle of locality used in Memory Hierarchy-SolutionHie.docx
Explain two Principle of locality used in Memory Hierarchy-SolutionHie.docxExplain two Principle of locality used in Memory Hierarchy-SolutionHie.docx
Explain two Principle of locality used in Memory Hierarchy-SolutionHie.docx
 
Explain the steps needed to configure RIPng and explain the advantages.docx
Explain the steps needed to configure RIPng and explain the advantages.docxExplain the steps needed to configure RIPng and explain the advantages.docx
Explain the steps needed to configure RIPng and explain the advantages.docx
 
Explain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docxExplain the motivation behind using a header file for a C program-Solu.docx
Explain the motivation behind using a header file for a C program-Solu.docx
 
Explain the importance of using the typedef keyword then write a C ++.docx
Explain the importance of using the typedef keyword then write a C ++.docxExplain the importance of using the typedef keyword then write a C ++.docx
Explain the importance of using the typedef keyword then write a C ++.docx
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Explain the use of directives in configuration files- Provide an examp.docx

  • 1. Explain the use of “directives” in configuration files. Provide an example of two directives found in an Apache configuration file and detail what each accomplishes. Solution The configuration files contain directives that can be applied to the entire server, or they may be restricted to apply only to particular directories, files, hosts, or URLs. HTTP Server of Apache is configured by putting or placing directives in plain text configuration files. Configuration file httpd.conf is called main configuration file. During compile time its location is set, but command line flag -f is used if it's need to be overridden ever.Directive "Include" is used to add other configuration files ,likewise wildcards can also be used to add many configuration files.Any of these configuration files can be used to place any of the directives,httpd is used to recognised if any of the changes is made in main configuration file when it is started or restarted. The <If Define>directive encloses directives that will only be applied if an appropriate parameter is defined on the httpdcommand line. The < IfModule>directive is very similar, except it encloses directives that will only be applied if a particular module is available in the server. The module must either be statically compiled in the server, or it must be dynamically compiled and its LoadModule line must be earlier in the configuration file. This directive should only be used if you need your configuration file to work whether or not certain modules are installed. It should not be used to enclose directives that you want to work all the time, because it can suppress useful error messages about missing modules.