SlideShare une entreprise Scribd logo
1  sur  21
APACHE The Apache HTTP Server, commonly referred to as Apache, is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million web site milestone. Apache was the first viable alternative to the Netscape Communications Corporation web server (currently known as Sun Java System Web Server), and has since evolved to rival other Unix-based web servers in terms of functionality and performance. The majority of web servers using Apache run a Unix-like operating system.[citation needed] Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The application is available for a wide variety of operating systems, including Unix, GNU, FreeBSD, Linux, Solaris, Novell NetWare, Mac OS X, Microsoft Windows, OS/2, TPF, and eComStation. Released under the Apache License, Apache is characterized as open source software. Since April 1996 Apache has been the most popular HTTP server software in use. As of February 2010[update] Apache served over 54.46% of all websites and over 66% of the million busiest.
FEATURES Features Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support Perl, Python, Tcl, and PHP. Popular authentication modules include mod_access, mod_auth, mod_digest, and mod_auth_digest, the successor to mod_digest. A sample of other features include SSL and TLS support (mod_ssl), a proxy module (mod_proxy), a URL rewriter (also known as a rewrite engine, implemented under mod_rewrite), custom log files (mod_log_config), and filtering support (mod_include and mod_ext_filter). Popular compression methods on Apache include the external extension module, mod_gzip, implemented to help with reduction of the size (weight) of web pages served over HTTP. ModSecurity is an open source intrusion detection and prevention engine for web applications. Apache logs can be analyzed through a web browser using free scripts such as AWStats/W3Perl or Visitors. Virtual hosting allows one Apache installation to serve many different actual websites. For example, one machine with one Apache installation could simultaneously serve www.example.com, www.test.com, test47.test-server.test.com, etc.
USE Apache is primarily used to serve both static content and dynamic Web pages on the World Wide Web. Many web applications are designed expecting the environment and features that Apache provides. Apache is redistributed as part of various proprietary software packages including the Oracle Database and the IBM WebSphere application server. Mac OS X integrates Apache as its built-in web server and as support for its WebObjects application server. It is also supported in some way by Borland in the Kylix and Delphi development tools. Apache is included with Novell NetWare 6.5, where it is the default web server. Apache is included with many Linux distributions. Apache is used for many other tasks where content needs to be made available in a secure and reliable way. One example is sharing files from a personal computer over the Internet. A user who has Apache installed on their desktop can put arbitrary files in Apache's document root which can then be shared. Programmers developing web applications often use a locally installed version of Apache in order to preview and test code as it is being developed. Microsoft Internet Information Services (IIS) is the main competitor to Apache, followed by Sun Microsystems' Sun Java System Web Server and a host of other applications such as Zeus Web Server.
PERFORMANCE Although the main design goal of Apache is not to be the "fastest" web server, Apache does have performance comparable to other "high-performance" web servers. Instead of implementing a single architecture, Apache provides a variety of MultiProcessing Modules (MPMs) which allow Apache to run in a process-based, hybrid (process and thread) or event-hybrid mode, to better match the demands of each particular infrastructure. This implies that the choice of correct MPM and the correct configuration is important. Where compromises in performance need to be made, the design of Apache is to reduce latency and increase throughput, relative to simply handling more requests, thus ensuring consistent and reliable processing of requests within reasonable time-frames.
HOW TO INSTALL  APACHE IN LINUX
Download Apache I recommend downloading the latest stable release. At the time of this writing, that was Apache 2.0. The best place to get Apache is from the Apache HTTP Server download site. Download the sources appropriate to your system. Binary releases are available as well.
Extract the Files Once you've downloaded the files you need to uncompress them and untarring: gunzip -d httpd-2_0_NN.tar.gz tar xvf httpd-2_0_NN.tar This creates a new directory under the current directory with the source files.
HOW TO CONFIGURE
Once you've got the files, you need to tell your machine where to find everything by configuring the source files. The easiest way is to accept all the defaults and just type: ./configure Of course, most people don't want to accept just the default choices. The most important option is the prefix= option. This specifies the directory where the Apache files will be installed. You can also set specific environment variables and modules. Some of the modules I like to have installed are: * mod_alias - to map different parts of the URL tree * mod_include - to parse Server Side Includes * mod_mime - to associate file extensions with its MIME-type * mod_rewrite - to rewrite URLs on the fly * mod_speling (sic) - to help your readers who might misspell URLs * mod_ssl - to allow for strong cryptography using SSL * mod_userdir - to allow system users to have their own Web page directories CONFIGURE
Customize Assuming that there were no problems, you are ready to customize your Apache configuration. This really just amounts to editing the httpd.conf file. This file is located in the PREFIX/conf directory. I generally edit it with vi: vi PREFIX/conf/httpd.conf Note: you'll need to be root to edit this file.
This is the main Apache HTTP server configuration file.  It contains the configuration directives that give the server its instructions. See <URL:http://httpd.apache.org/docs/2.2> for detailed information. In particular, see  <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> for a discussion of each configuration directive. Do NOT simply read the instructions in here without understanding what they do.  They're here only as hints or reminders.  If you are unsure consult the online docs. You have been warned.  Configuration and logfile names : If the filenames you specify for many of the server's control files begin with &quot;/&quot; (or &quot;drive:/&quot; for Win32), the server will use that explicit path.  If the filenames do *not* begin with &quot;/&quot;, the value of ServerRoot is prepended -- so &quot;logs/foo.log&quot; with ServerRoot set to &quot;/opt/lampp&quot; will be interpreted by the server as &quot;/opt/lampp/logs/foo.log&quot;.
ServerRoot : The top of the directory tree under which the server's configuration, error, and log files are kept. Do not add a slash at the end of the directory path.  If you point ServerRoot at a non-local disk, be sure to point the LockFile directive at a local disk.  If you wish to share the same ServerRoot for multiple httpd daemons, you will need to change at least LockFile and PidFile. ServerRoot &quot;/opt/lampp&quot; Listen : Allows you to bind Apache to specific IP addresses and/or ports, instead of the default. See also the <VirtualHost> directive. Change this to Listen on specific IP addresses as shown below to  prevent Apache from glomming onto all bound IP addresses. Listen 12.34.56.78:80 Listen 80
'Main' server configuration The directives in this section set up the values used by the 'main' server, which responds to any requests that aren't handled by a <VirtualHost> definition.  These values also provide defaults for any <VirtualHost> containers you may define later in the file. All of these directives may appear inside <VirtualHost> containers, in which case these default settings will be overridden for the virtual host being defined. ServerAdmin :  Your address, where problems with the server should be e-mailed.  This address appears on some server-generated pages, such as error documents.  e.g. admin@your-domain.com ServerAdmin you@example.com
DocumentRoot :  The directory out of which you will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations. DocumentRoot &quot;/opt/lampp/htdocs&quot; Each directory to which Apache has access can be configured with respect to which services and features are allowed and/or disabled in that directory (and its subdirectories).  First, we configure the &quot;default&quot; to be a very restrictive set of  features.  <Directory /> Options FollowSymLinks AllowOverride None #XAMPP #Order deny,allow #Deny from all </Directory>
DirectoryIndex :  sets the file that Apache will serve if a directory is requested. <IfModule dir_module> #DirectoryIndex index.html # XAMPP DirectoryIndex index.html index.html.var index.php index.php3 index.php4 </IfModule> The following lines prevent .htaccess and .htpasswd files from being  viewed by Web clients.  <FilesMatch &quot;^ht&quot;> Order allow,deny Deny from all </FilesMatch>
DefaultType :  the default MIME type the server will use for a document if it cannot otherwise determine one, such as from filename extensions. If your server contains mostly text or HTML documents, &quot;text/plain&quot; is a good value.  If most of your content is binary, such as applications or images, you may want to use &quot;application/octet-stream&quot; instead to keep browsers from trying to display binary files as though they are text. DefaultType text/plain <IfModule mime_module> TypesConfig points to the file containing the list of mappings from filename extension to MIME-type. TypesConfig etc/mime.types AddType allows you to add to or override the MIME configuration file specified in TypesConfig for specific file types. AddType application/x-gzip .tgz AddEncoding allows you to have certain browsers uncompress information on the fly. Note: Not all browsers support this.
EnableMMAP and EnableSendfile : On systems that support it,  memory-mapping or the sendfile syscall is used to deliver files.  This usually improves server performance, but must be turned off when serving from networked-mounted  filesystems or if support for these functions is otherwise broken on your system. EnableMMAP off EnableSendfile off Supplemental configuration The configuration files in the etc/extra/ directory can be  included to add extra features or to modify the default configuration of  the server, or you may simply copy their contents here and change as  necessary.
Server-pool management  (MPM specific) Include etc/extra/httpd-mpm.conf Multi-language error messages Include etc/extra/httpd-multilang-errordoc.conf Fancy directory listings Include etc/extra/httpd-autoindex.conf Language settings Include etc/extra/httpd-languages.conf User home directories Include etc/extra/httpd-userdir.conf Real-time info on requests and configuration Include etc/extra/httpd-info.conf Virtual hosts Include etc/extra/httpd-vhosts.conf Local access to the Apache HTTP Server Manual Include etc/extra/httpd-manual.conf Distributed authoring and versioning (WebDAV) Include etc/extra/httpd-dav.conf
Various default settings Include etc/extra/httpd-default.conf Secure (SSL/TLS) connections <IfModule ssl_module> XAMPP <IfDefine SSL> Include etc/extra/httpd-ssl.conf </IfDefine> </IfModule> Note: The following must must be present to support starting without SSL on platforms with no /dev/random equivalent but a statically compiled-in mod_ssl. <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> XAMPP Include etc/extra/httpd-xampp.conf
Test Your Server Open a Web browser on the same machine and type http://localhost/ in the address box. You should see a page similar to the one in the partial screen shot above. Specifically, it will say in big letters &quot;Seeing this instead of the website you expected?&quot; This is good news, as it means your server installed correctly. Start Editing/Uploading Pages Once your server is up and running you can start posting pages. Have fun building your Web site.
Thank you

Contenu connexe

Tendances

Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
alexjones89
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
Jin Castor
 

Tendances (20)

Xampp Ppt
Xampp PptXampp Ppt
Xampp Ppt
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management
 
Apache Presentation
Apache PresentationApache Presentation
Apache Presentation
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
Laravel Introduction
Laravel IntroductionLaravel Introduction
Laravel Introduction
 
virtual hosting and configuration
virtual hosting and configurationvirtual hosting and configuration
virtual hosting and configuration
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Nginx
NginxNginx
Nginx
 
Laravel presentation
Laravel presentationLaravel presentation
Laravel presentation
 
Web servers
Web serversWeb servers
Web servers
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Xampp Ppt
Xampp PptXampp Ppt
Xampp Ppt
 
Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
Linux introduction, class 1
Linux introduction, class 1Linux introduction, class 1
Linux introduction, class 1
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
 

En vedette

Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
webhostingguy
 
APACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUXAPACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUX
webhostingguy
 

En vedette (17)

Apache Presentation
Apache PresentationApache Presentation
Apache Presentation
 
Apache Ppt
Apache PptApache Ppt
Apache Ppt
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
 
Apache web-server-architecture
Apache web-server-architectureApache web-server-architecture
Apache web-server-architecture
 
Apache Tutorial
Apache TutorialApache Tutorial
Apache Tutorial
 
APACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUXAPACHE WEB SERVER FOR LINUX
APACHE WEB SERVER FOR LINUX
 
Servlet
Servlet Servlet
Servlet
 
MySQL Introduction
MySQL IntroductionMySQL Introduction
MySQL Introduction
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
MySQL
MySQLMySQL
MySQL
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
Introduction to Mysql
Introduction to MysqlIntroduction to Mysql
Introduction to Mysql
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 

Similaire à Apache ppt (20)

APACHE
APACHEAPACHE
APACHE
 
Apache
Apache Apache
Apache
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
A
AA
A
 
APACHE
APACHEAPACHE
APACHE
 
Apache doc
Apache docApache doc
Apache doc
 
Apache doc
Apache docApache doc
Apache doc
 
Babitha.4appach
Babitha.4appachBabitha.4appach
Babitha.4appach
 
Babitha.4appach
Babitha.4appachBabitha.4appach
Babitha.4appach
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Nadhiya lamp
Nadhiya lampNadhiya lamp
Nadhiya lamp
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
Apache windows
Apache windowsApache windows
Apache windows
 
Diva23
Diva23Diva23
Diva23
 
lamp technology
lamp technologylamp technology
lamp technology
 

Plus de Sanmuga Nathan (7)

Html Ppt
Html PptHtml Ppt
Html Ppt
 
Web2.0 ppt
Web2.0 pptWeb2.0 ppt
Web2.0 ppt
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
Html ppt
Html pptHtml ppt
Html ppt
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Php ppt
Php pptPhp ppt
Php ppt
 

Dernier

Dernier (20)

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Apache ppt

  • 1. APACHE The Apache HTTP Server, commonly referred to as Apache, is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million web site milestone. Apache was the first viable alternative to the Netscape Communications Corporation web server (currently known as Sun Java System Web Server), and has since evolved to rival other Unix-based web servers in terms of functionality and performance. The majority of web servers using Apache run a Unix-like operating system.[citation needed] Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The application is available for a wide variety of operating systems, including Unix, GNU, FreeBSD, Linux, Solaris, Novell NetWare, Mac OS X, Microsoft Windows, OS/2, TPF, and eComStation. Released under the Apache License, Apache is characterized as open source software. Since April 1996 Apache has been the most popular HTTP server software in use. As of February 2010[update] Apache served over 54.46% of all websites and over 66% of the million busiest.
  • 2. FEATURES Features Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Some common language interfaces support Perl, Python, Tcl, and PHP. Popular authentication modules include mod_access, mod_auth, mod_digest, and mod_auth_digest, the successor to mod_digest. A sample of other features include SSL and TLS support (mod_ssl), a proxy module (mod_proxy), a URL rewriter (also known as a rewrite engine, implemented under mod_rewrite), custom log files (mod_log_config), and filtering support (mod_include and mod_ext_filter). Popular compression methods on Apache include the external extension module, mod_gzip, implemented to help with reduction of the size (weight) of web pages served over HTTP. ModSecurity is an open source intrusion detection and prevention engine for web applications. Apache logs can be analyzed through a web browser using free scripts such as AWStats/W3Perl or Visitors. Virtual hosting allows one Apache installation to serve many different actual websites. For example, one machine with one Apache installation could simultaneously serve www.example.com, www.test.com, test47.test-server.test.com, etc.
  • 3. USE Apache is primarily used to serve both static content and dynamic Web pages on the World Wide Web. Many web applications are designed expecting the environment and features that Apache provides. Apache is redistributed as part of various proprietary software packages including the Oracle Database and the IBM WebSphere application server. Mac OS X integrates Apache as its built-in web server and as support for its WebObjects application server. It is also supported in some way by Borland in the Kylix and Delphi development tools. Apache is included with Novell NetWare 6.5, where it is the default web server. Apache is included with many Linux distributions. Apache is used for many other tasks where content needs to be made available in a secure and reliable way. One example is sharing files from a personal computer over the Internet. A user who has Apache installed on their desktop can put arbitrary files in Apache's document root which can then be shared. Programmers developing web applications often use a locally installed version of Apache in order to preview and test code as it is being developed. Microsoft Internet Information Services (IIS) is the main competitor to Apache, followed by Sun Microsystems' Sun Java System Web Server and a host of other applications such as Zeus Web Server.
  • 4. PERFORMANCE Although the main design goal of Apache is not to be the &quot;fastest&quot; web server, Apache does have performance comparable to other &quot;high-performance&quot; web servers. Instead of implementing a single architecture, Apache provides a variety of MultiProcessing Modules (MPMs) which allow Apache to run in a process-based, hybrid (process and thread) or event-hybrid mode, to better match the demands of each particular infrastructure. This implies that the choice of correct MPM and the correct configuration is important. Where compromises in performance need to be made, the design of Apache is to reduce latency and increase throughput, relative to simply handling more requests, thus ensuring consistent and reliable processing of requests within reasonable time-frames.
  • 5. HOW TO INSTALL APACHE IN LINUX
  • 6. Download Apache I recommend downloading the latest stable release. At the time of this writing, that was Apache 2.0. The best place to get Apache is from the Apache HTTP Server download site. Download the sources appropriate to your system. Binary releases are available as well.
  • 7. Extract the Files Once you've downloaded the files you need to uncompress them and untarring: gunzip -d httpd-2_0_NN.tar.gz tar xvf httpd-2_0_NN.tar This creates a new directory under the current directory with the source files.
  • 9. Once you've got the files, you need to tell your machine where to find everything by configuring the source files. The easiest way is to accept all the defaults and just type: ./configure Of course, most people don't want to accept just the default choices. The most important option is the prefix= option. This specifies the directory where the Apache files will be installed. You can also set specific environment variables and modules. Some of the modules I like to have installed are: * mod_alias - to map different parts of the URL tree * mod_include - to parse Server Side Includes * mod_mime - to associate file extensions with its MIME-type * mod_rewrite - to rewrite URLs on the fly * mod_speling (sic) - to help your readers who might misspell URLs * mod_ssl - to allow for strong cryptography using SSL * mod_userdir - to allow system users to have their own Web page directories CONFIGURE
  • 10. Customize Assuming that there were no problems, you are ready to customize your Apache configuration. This really just amounts to editing the httpd.conf file. This file is located in the PREFIX/conf directory. I generally edit it with vi: vi PREFIX/conf/httpd.conf Note: you'll need to be root to edit this file.
  • 11. This is the main Apache HTTP server configuration file. It contains the configuration directives that give the server its instructions. See <URL:http://httpd.apache.org/docs/2.2> for detailed information. In particular, see <URL:http://httpd.apache.org/docs/2.2/mod/directives.html> for a discussion of each configuration directive. Do NOT simply read the instructions in here without understanding what they do. They're here only as hints or reminders. If you are unsure consult the online docs. You have been warned. Configuration and logfile names : If the filenames you specify for many of the server's control files begin with &quot;/&quot; (or &quot;drive:/&quot; for Win32), the server will use that explicit path. If the filenames do *not* begin with &quot;/&quot;, the value of ServerRoot is prepended -- so &quot;logs/foo.log&quot; with ServerRoot set to &quot;/opt/lampp&quot; will be interpreted by the server as &quot;/opt/lampp/logs/foo.log&quot;.
  • 12. ServerRoot : The top of the directory tree under which the server's configuration, error, and log files are kept. Do not add a slash at the end of the directory path. If you point ServerRoot at a non-local disk, be sure to point the LockFile directive at a local disk. If you wish to share the same ServerRoot for multiple httpd daemons, you will need to change at least LockFile and PidFile. ServerRoot &quot;/opt/lampp&quot; Listen : Allows you to bind Apache to specific IP addresses and/or ports, instead of the default. See also the <VirtualHost> directive. Change this to Listen on specific IP addresses as shown below to prevent Apache from glomming onto all bound IP addresses. Listen 12.34.56.78:80 Listen 80
  • 13. 'Main' server configuration The directives in this section set up the values used by the 'main' server, which responds to any requests that aren't handled by a <VirtualHost> definition. These values also provide defaults for any <VirtualHost> containers you may define later in the file. All of these directives may appear inside <VirtualHost> containers, in which case these default settings will be overridden for the virtual host being defined. ServerAdmin : Your address, where problems with the server should be e-mailed. This address appears on some server-generated pages, such as error documents. e.g. admin@your-domain.com ServerAdmin you@example.com
  • 14. DocumentRoot : The directory out of which you will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations. DocumentRoot &quot;/opt/lampp/htdocs&quot; Each directory to which Apache has access can be configured with respect to which services and features are allowed and/or disabled in that directory (and its subdirectories). First, we configure the &quot;default&quot; to be a very restrictive set of features. <Directory /> Options FollowSymLinks AllowOverride None #XAMPP #Order deny,allow #Deny from all </Directory>
  • 15. DirectoryIndex : sets the file that Apache will serve if a directory is requested. <IfModule dir_module> #DirectoryIndex index.html # XAMPP DirectoryIndex index.html index.html.var index.php index.php3 index.php4 </IfModule> The following lines prevent .htaccess and .htpasswd files from being viewed by Web clients. <FilesMatch &quot;^ht&quot;> Order allow,deny Deny from all </FilesMatch>
  • 16. DefaultType : the default MIME type the server will use for a document if it cannot otherwise determine one, such as from filename extensions. If your server contains mostly text or HTML documents, &quot;text/plain&quot; is a good value. If most of your content is binary, such as applications or images, you may want to use &quot;application/octet-stream&quot; instead to keep browsers from trying to display binary files as though they are text. DefaultType text/plain <IfModule mime_module> TypesConfig points to the file containing the list of mappings from filename extension to MIME-type. TypesConfig etc/mime.types AddType allows you to add to or override the MIME configuration file specified in TypesConfig for specific file types. AddType application/x-gzip .tgz AddEncoding allows you to have certain browsers uncompress information on the fly. Note: Not all browsers support this.
  • 17. EnableMMAP and EnableSendfile : On systems that support it, memory-mapping or the sendfile syscall is used to deliver files. This usually improves server performance, but must be turned off when serving from networked-mounted filesystems or if support for these functions is otherwise broken on your system. EnableMMAP off EnableSendfile off Supplemental configuration The configuration files in the etc/extra/ directory can be included to add extra features or to modify the default configuration of the server, or you may simply copy their contents here and change as necessary.
  • 18. Server-pool management (MPM specific) Include etc/extra/httpd-mpm.conf Multi-language error messages Include etc/extra/httpd-multilang-errordoc.conf Fancy directory listings Include etc/extra/httpd-autoindex.conf Language settings Include etc/extra/httpd-languages.conf User home directories Include etc/extra/httpd-userdir.conf Real-time info on requests and configuration Include etc/extra/httpd-info.conf Virtual hosts Include etc/extra/httpd-vhosts.conf Local access to the Apache HTTP Server Manual Include etc/extra/httpd-manual.conf Distributed authoring and versioning (WebDAV) Include etc/extra/httpd-dav.conf
  • 19. Various default settings Include etc/extra/httpd-default.conf Secure (SSL/TLS) connections <IfModule ssl_module> XAMPP <IfDefine SSL> Include etc/extra/httpd-ssl.conf </IfDefine> </IfModule> Note: The following must must be present to support starting without SSL on platforms with no /dev/random equivalent but a statically compiled-in mod_ssl. <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> XAMPP Include etc/extra/httpd-xampp.conf
  • 20. Test Your Server Open a Web browser on the same machine and type http://localhost/ in the address box. You should see a page similar to the one in the partial screen shot above. Specifically, it will say in big letters &quot;Seeing this instead of the website you expected?&quot; This is good news, as it means your server installed correctly. Start Editing/Uploading Pages Once your server is up and running you can start posting pages. Have fun building your Web site.