SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Prepared by: Dima Gomaa
 Apache is a web server package that works under Linux as well as
under other operating systems
 The name Apache comes from the concept of extensive patching of
existing code
 The primary advantage of Apache is that it is generally free or
available at modest costs
 Download newest version of Apache
◦ May be installed from a CD-ROM as well
 Unzip downloaded file
 Untar the tar file
 Create the MAKE files
 Make Install
 Edit httpd.conf file
 Start Apache Server
 If your CD-ROM has Apache and you want to use RPM to install the
package, issue this command
◦ rpm –i apache_1_3_4.rpm
(substitute the full name of the Apache package)
 First, in Linux, create a folder to hold the Apache file you will download.
 The newest version of Apache Server and Documentation can be found
at The Apache Software Foundation http://www.apache.org/
 To download the newest version of Apache go to
http://www.apache.org/dist/ and click on httpd-2.4.4.tar.gz
 Download this file into your newly created directory.
 NOTE: apache 2.4.4 is the latest version at the time of this writing. You
may want to check for newer releases.
 After you have downloaded your Apache file go into the folder you have
downloaded it into by typing cd /path to folder/name of folder/
 Next, to unzip the .gz file at the prompt type: gunzip httpd-2.4.4.tar.gz
and press the enter key.
 This will unzip the file into the current directory.
 After unzipping the .gz file the resulting file will be a .tar file. (Which
stands for tape archival)
 You will need to untar this file by typing at the prompt:
◦ tar –xvf httpd-2.4.4.tar
 This will un-tar the file to a new directory named httpd-2.4.4
 Go into the folder that now contains the untarred apache files. To change
into that folder, at the prompt type:
◦ cd /<path to folder>/httpd-2.4.4
 Once you are in the httpd-2.4.4 folder you will need to create the apache
make files
 To do this, at the prompt type:
◦ ./configure --prefix=/usr/local/apache and press the enter key. This will install apache in
the folder /usr/local/apache.
 You may chose to install in another directory.
 After running the configure command you will need to compile
the make files.
 To compile the make file, from inside in the httpd-2.4.4
directory, at the prompt, simply type:
◦ make
 Next you must run the make install.
 While still in the directory httpd-2.4.4, at the prompt, type:
◦ make install
 This will install the apache server to the directory defined in the
configure command.
 In order to get the apache server started you must edit the httpd.conf file.
The file is located in whatever directory you installed apache in.
 Once in your apache install directory find the folder named conf.
 Change into the conf folder and locate the file named httpd.conf.
 Open the httpd.conf file with any file editor.
 Next locate the line # ServerName <Name> and uncomment out this line by
deleting the # symbol preceding ServerName.
 Save the file and close it.
 To start your Apache server you must either put the location of the
directory, where your Apache server is installed, in you PATH
environment variable or you must change into your Apache directory
and at the prompt type:
◦ ./apachectl start
 If the path to your Apache install directory is already in your PATH
environment variable, then you can type:
◦ apachectl start
 To stop your Apache Server, from inside the directory where your
Apache is installed, type:
◦ ./apachectl stop
 To restart your Apache Server, from the directory where your Apache
is installed, type:
◦ apachectl restart
 After you have installed and started your Apache server you can test
to if everything is running OK by doing the following…
 Start a browser application.
 If you installed Apache as root, type in the address bar of your
browser the name of your computer and press enter.
 If everything has gone as it should have you should see a page with
the apache logo at the top explaining why you are seeing this page.
This page gives you links to all the apache documentation which you
should read.
 If you would like to customize this index page it is called
index.html.en in the htdocs directory located in the directory your
Apache server is installed.
(source: http:// www.apache.org/)
 Create the home directory for the website, we will use
/usr/www/mywebsite
 Create 3 subdirectories under the site directory
◦ conf
◦ htdocs
◦ logs
 You will find a subdirectory called conf under the directory where
you installed Apache
◦ Copy 3 files (srm.conf-didst, access.conf-dist, http.conf-dist) from
this directory into /usr/www/mywebsite/conf
◦ If you cannot find the 3 files, use the find command to find them
 Rename the 3 files you just copied to drop the “-dist” portion of the
name
 Edit the httpd.conf file to specify
◦ the port number on which your web server responds
◦ the user running the httpd daemon, etc…
 Specify the server name
◦ ServerName ganesan.com
 Add a line that specifies the root directory for your website
◦ DocumentRoot /usr/www/mywebsite/htdocs
 Edit the srm.conf file to set up the web home directory and any
special internal command usage
 Edit the access.conf file to set a basic set of access permissions
 In the htdocs directory create an HTML file for the server to read
when it starts
◦ This can be any HTML file
◦ The filename should be default.html
 Start the httpd daemon
◦ httpd –f /usr/www/mywebsite/conf
 Test the web server by starting a browser and specify the URL
http://127.0.0.1/
 If the system is working properly, you will see a screen with a list of
files in the htdocs directory
 Make sure the ServerType directive is set to “standalone”
 Check the Port device to make sure it is set to the TCP/IP port to
which your Apache server listens
 Set the User directive to either the user ID (UID) or the user name
used for all web visitors
 Set the Group directive to either the group ID (GID) or the group
name assigned to all web users
 Modify the ServerAdmin directive to include the e-mail address of
the administrator
 Set the ServerRoot directive to the absolute path to the directory
where all Apache resource and configuration files are stored
◦ /usr/apache/conf or /etc/httpd
 Set the ServerName directive to the fully qualified domain name of
your server
 If you are running Apache as a standalone server, you need to start
and stop Apache manually
◦ Start with httpd –d rootdir –f configs
◦ To stop Apache use ps to detect the httpd daemon’s PID and use
the kill command to terminate the process
 A virtual host is a web server that resides on one domain but acts
as if it was on another. For example, suppose you control
ganesan.com and test.com. Instead of setting up 2 servers, you
can set up a single machine that serves both domains.
 Virtual hosting saves on machinery and allows for a lot of flexibility
in setting up web servers
 If your network uses a name server for DNS, modify it so that the
domain name points to your web server for each domain you’ll host
 Use the ifconfig command to set up the IP address for each domain
on your server
◦ ifconfig eth0:1 xxx.xxx.xxx.xxx
 Add the route to the network configuration using the route command
◦ route add –host xxx.xxx.xxx.xxx dev eth0:1
 Edit the Apache httpd.conf file to set up virtual hosting
◦ <VirtualHost www.test.com>
DocumentRoot /usr/www/test/htdocs
TransferLog /usr/www/test/logs/access
ErrorLog /usr/www/test/logs/errors
</VirtualHost>
 The previous step defines the virtual host for test.com and specifies
its DocumentRoot, since each virtual host will have different web
directories
 If more than one virtual host is defined, the entries are to be
repeated for each

Weitere ähnliche Inhalte

Was ist angesagt?

Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSSiddharth Ram Dinesh
 
WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.pptwebhostingguy
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning InfrastructurePerforce
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5William Lee
 
Apache Presentation
Apache PresentationApache Presentation
Apache PresentationAnkush Jain
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hostingwebhostingguy
 
Lesson 9. The Apache Web Server
Lesson 9. The Apache Web ServerLesson 9. The Apache Web Server
Lesson 9. The Apache Web Serverwebhostingguy
 
Apache installation and configurations
Apache installation and configurationsApache installation and configurations
Apache installation and configurationsNikhil Jain
 
Web server installation_configuration_apache
Web server installation_configuration_apacheWeb server installation_configuration_apache
Web server installation_configuration_apacheShaojie Yang
 
How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04Sanjary Edu
 
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 HadoopAiden Seonghak Hong
 
Apache windows
Apache windowsApache windows
Apache windowsmexxixxo
 
R hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveR hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveAiden Seonghak Hong
 

Was ist angesagt? (19)

Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OS
 
are available here
are available hereare available here
are available here
 
WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.ppt
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
 
Sahul
SahulSahul
Sahul
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Apache Web Server Setup 2
Apache Web Server Setup 2Apache Web Server Setup 2
Apache Web Server Setup 2
 
Apache Presentation
Apache PresentationApache Presentation
Apache Presentation
 
nir
nirnir
nir
 
Apache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual HostingApache web server installation/configuration, Virtual Hosting
Apache web server installation/configuration, Virtual Hosting
 
Apache
ApacheApache
Apache
 
Lesson 9. The Apache Web Server
Lesson 9. The Apache Web ServerLesson 9. The Apache Web Server
Lesson 9. The Apache Web Server
 
Apache installation and configurations
Apache installation and configurationsApache installation and configurations
Apache installation and configurations
 
Web server installation_configuration_apache
Web server installation_configuration_apacheWeb server installation_configuration_apache
Web server installation_configuration_apache
 
How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04How to Install LAMP in Ubuntu 14.04
How to Install LAMP in Ubuntu 14.04
 
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
 
Apache windows
Apache windowsApache windows
Apache windows
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
 
R hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing HiveR hive tutorial supplement 2 - Installing Hive
R hive tutorial supplement 2 - Installing Hive
 

Andere mochten auch

ISCSI server configuration
ISCSI server configurationISCSI server configuration
ISCSI server configurationThamizharasan P
 
Nagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light BarNagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light BarNagios
 
Apache server configuration
Apache server configurationApache server configuration
Apache server configurationThamizharasan P
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configurationThamizharasan P
 
Network configuration in Linux
Network configuration in LinuxNetwork configuration in Linux
Network configuration in LinuxMohammed Yazdani
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in LinuxThamizharasan P
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configurationThamizharasan P
 
GlusterFS CTDB Integration
GlusterFS CTDB IntegrationGlusterFS CTDB Integration
GlusterFS CTDB IntegrationEtsuji Nakai
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios
 
SELinux for Everyday Users
SELinux for Everyday UsersSELinux for Everyday Users
SELinux for Everyday UsersPaulWay
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guidejasembo
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server13bcs0012
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Icinga
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)Sumant Garg
 
Computer monitoring with the Open Monitoring Distribution
Computer monitoring with the Open Monitoring DistributionComputer monitoring with the Open Monitoring Distribution
Computer monitoring with the Open Monitoring DistributionKelvin Vanderlip
 

Andere mochten auch (20)

ISCSI server configuration
ISCSI server configurationISCSI server configuration
ISCSI server configuration
 
Nagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light BarNagios Conference 2013 - David Stern - The Nagios Light Bar
Nagios Conference 2013 - David Stern - The Nagios Light Bar
 
Apache server configuration
Apache server configurationApache server configuration
Apache server configuration
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configuration
 
Network configuration in Linux
Network configuration in LinuxNetwork configuration in Linux
Network configuration in Linux
 
Webmin configuration in Linux
Webmin configuration in LinuxWebmin configuration in Linux
Webmin configuration in Linux
 
Samba server configuration
Samba server configurationSamba server configuration
Samba server configuration
 
GlusterFS CTDB Integration
GlusterFS CTDB IntegrationGlusterFS CTDB Integration
GlusterFS CTDB Integration
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
 
SELinux for Everyday Users
SELinux for Everyday UsersSELinux for Everyday Users
SELinux for Everyday Users
 
Squid server
Squid serverSquid server
Squid server
 
Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guide
 
Squid Server
Squid ServerSquid Server
Squid Server
 
Squid Proxy Server
Squid Proxy ServerSquid Proxy Server
Squid Proxy Server
 
Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015Why favour Icinga over Nagios @ FrOSCon 2015
Why favour Icinga over Nagios @ FrOSCon 2015
 
FILE SERVER
FILE SERVERFILE SERVER
FILE SERVER
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)
 
Computer monitoring with the Open Monitoring Distribution
Computer monitoring with the Open Monitoring DistributionComputer monitoring with the Open Monitoring Distribution
Computer monitoring with the Open Monitoring Distribution
 
Rh436 pdf
Rh436 pdfRh436 pdf
Rh436 pdf
 
Squid
SquidSquid
Squid
 

Ähnlich wie Linux apache installation

Ähnlich wie Linux apache installation (20)

Linux Webserver Installation Command and GUI.ppt
Linux Webserver Installation Command and GUI.pptLinux Webserver Installation Command and GUI.ppt
Linux Webserver Installation Command and GUI.ppt
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
 
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
 
Installing and configuring apache
Installing and configuring apacheInstalling and configuring apache
Installing and configuring apache
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
Apache Ppt
Apache PptApache Ppt
Apache Ppt
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Setting up LAMP for Linux newbies
Setting up LAMP for Linux newbiesSetting up LAMP for Linux newbies
Setting up LAMP for Linux newbies
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xamppInstalling php and my sql locally using xampp
Installing php and my sql locally using xampp
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
02 Hadoop deployment and configuration
02 Hadoop deployment and configuration02 Hadoop deployment and configuration
02 Hadoop deployment and configuration
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase client
 
Diva23
Diva23Diva23
Diva23
 
Apache HTTP Server
Apache HTTP ServerApache HTTP Server
Apache HTTP Server
 
Http
HttpHttp
Http
 

Linux apache installation

  • 2.  Apache is a web server package that works under Linux as well as under other operating systems  The name Apache comes from the concept of extensive patching of existing code  The primary advantage of Apache is that it is generally free or available at modest costs
  • 3.  Download newest version of Apache ◦ May be installed from a CD-ROM as well  Unzip downloaded file  Untar the tar file  Create the MAKE files  Make Install  Edit httpd.conf file  Start Apache Server
  • 4.  If your CD-ROM has Apache and you want to use RPM to install the package, issue this command ◦ rpm –i apache_1_3_4.rpm (substitute the full name of the Apache package)
  • 5.  First, in Linux, create a folder to hold the Apache file you will download.  The newest version of Apache Server and Documentation can be found at The Apache Software Foundation http://www.apache.org/  To download the newest version of Apache go to http://www.apache.org/dist/ and click on httpd-2.4.4.tar.gz  Download this file into your newly created directory.  NOTE: apache 2.4.4 is the latest version at the time of this writing. You may want to check for newer releases.
  • 6.  After you have downloaded your Apache file go into the folder you have downloaded it into by typing cd /path to folder/name of folder/  Next, to unzip the .gz file at the prompt type: gunzip httpd-2.4.4.tar.gz and press the enter key.  This will unzip the file into the current directory.
  • 7.  After unzipping the .gz file the resulting file will be a .tar file. (Which stands for tape archival)  You will need to untar this file by typing at the prompt: ◦ tar –xvf httpd-2.4.4.tar  This will un-tar the file to a new directory named httpd-2.4.4
  • 8.  Go into the folder that now contains the untarred apache files. To change into that folder, at the prompt type: ◦ cd /<path to folder>/httpd-2.4.4  Once you are in the httpd-2.4.4 folder you will need to create the apache make files  To do this, at the prompt type: ◦ ./configure --prefix=/usr/local/apache and press the enter key. This will install apache in the folder /usr/local/apache.  You may chose to install in another directory.
  • 9.  After running the configure command you will need to compile the make files.  To compile the make file, from inside in the httpd-2.4.4 directory, at the prompt, simply type: ◦ make
  • 10.  Next you must run the make install.  While still in the directory httpd-2.4.4, at the prompt, type: ◦ make install  This will install the apache server to the directory defined in the configure command.
  • 11.  In order to get the apache server started you must edit the httpd.conf file. The file is located in whatever directory you installed apache in.  Once in your apache install directory find the folder named conf.  Change into the conf folder and locate the file named httpd.conf.  Open the httpd.conf file with any file editor.  Next locate the line # ServerName <Name> and uncomment out this line by deleting the # symbol preceding ServerName.  Save the file and close it.
  • 12.  To start your Apache server you must either put the location of the directory, where your Apache server is installed, in you PATH environment variable or you must change into your Apache directory and at the prompt type: ◦ ./apachectl start  If the path to your Apache install directory is already in your PATH environment variable, then you can type: ◦ apachectl start
  • 13.  To stop your Apache Server, from inside the directory where your Apache is installed, type: ◦ ./apachectl stop  To restart your Apache Server, from the directory where your Apache is installed, type: ◦ apachectl restart
  • 14.  After you have installed and started your Apache server you can test to if everything is running OK by doing the following…  Start a browser application.  If you installed Apache as root, type in the address bar of your browser the name of your computer and press enter.
  • 15.  If everything has gone as it should have you should see a page with the apache logo at the top explaining why you are seeing this page. This page gives you links to all the apache documentation which you should read.  If you would like to customize this index page it is called index.html.en in the htdocs directory located in the directory your Apache server is installed. (source: http:// www.apache.org/)
  • 16.  Create the home directory for the website, we will use /usr/www/mywebsite  Create 3 subdirectories under the site directory ◦ conf ◦ htdocs ◦ logs
  • 17.  You will find a subdirectory called conf under the directory where you installed Apache ◦ Copy 3 files (srm.conf-didst, access.conf-dist, http.conf-dist) from this directory into /usr/www/mywebsite/conf ◦ If you cannot find the 3 files, use the find command to find them
  • 18.  Rename the 3 files you just copied to drop the “-dist” portion of the name  Edit the httpd.conf file to specify ◦ the port number on which your web server responds ◦ the user running the httpd daemon, etc…  Specify the server name ◦ ServerName ganesan.com
  • 19.  Add a line that specifies the root directory for your website ◦ DocumentRoot /usr/www/mywebsite/htdocs  Edit the srm.conf file to set up the web home directory and any special internal command usage  Edit the access.conf file to set a basic set of access permissions
  • 20.  In the htdocs directory create an HTML file for the server to read when it starts ◦ This can be any HTML file ◦ The filename should be default.html  Start the httpd daemon ◦ httpd –f /usr/www/mywebsite/conf
  • 21.  Test the web server by starting a browser and specify the URL http://127.0.0.1/  If the system is working properly, you will see a screen with a list of files in the htdocs directory
  • 22.
  • 23.  Make sure the ServerType directive is set to “standalone”  Check the Port device to make sure it is set to the TCP/IP port to which your Apache server listens  Set the User directive to either the user ID (UID) or the user name used for all web visitors
  • 24.  Set the Group directive to either the group ID (GID) or the group name assigned to all web users  Modify the ServerAdmin directive to include the e-mail address of the administrator  Set the ServerRoot directive to the absolute path to the directory where all Apache resource and configuration files are stored ◦ /usr/apache/conf or /etc/httpd
  • 25.  Set the ServerName directive to the fully qualified domain name of your server
  • 26.
  • 27.  If you are running Apache as a standalone server, you need to start and stop Apache manually ◦ Start with httpd –d rootdir –f configs ◦ To stop Apache use ps to detect the httpd daemon’s PID and use the kill command to terminate the process
  • 28.
  • 29.  A virtual host is a web server that resides on one domain but acts as if it was on another. For example, suppose you control ganesan.com and test.com. Instead of setting up 2 servers, you can set up a single machine that serves both domains.  Virtual hosting saves on machinery and allows for a lot of flexibility in setting up web servers
  • 30.  If your network uses a name server for DNS, modify it so that the domain name points to your web server for each domain you’ll host  Use the ifconfig command to set up the IP address for each domain on your server ◦ ifconfig eth0:1 xxx.xxx.xxx.xxx
  • 31.  Add the route to the network configuration using the route command ◦ route add –host xxx.xxx.xxx.xxx dev eth0:1  Edit the Apache httpd.conf file to set up virtual hosting ◦ <VirtualHost www.test.com> DocumentRoot /usr/www/test/htdocs TransferLog /usr/www/test/logs/access ErrorLog /usr/www/test/logs/errors </VirtualHost>
  • 32.  The previous step defines the virtual host for test.com and specifies its DocumentRoot, since each virtual host will have different web directories  If more than one virtual host is defined, the entries are to be repeated for each