Your SlideShare is downloading. ×
0
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Web Server Administration
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Web Server Administration

545

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
545
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
35
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Web Server Administration Chapter 6 Configuring a Web Server
  • 2. Overview <ul><li>Understand how a Web server works </li></ul><ul><li>Install IIS and Apache Web servers </li></ul><ul><li>Examine the IIS and Apache properties </li></ul><ul><li>Host multiple Web sites </li></ul><ul><li>Configure new Web sites in IIS and Apache </li></ul><ul><li>Understand virtual directories </li></ul>
  • 3. How a Web Server Works <ul><li>HTTP (Hypertext Transfer Protocol) defines how information is passed between a browser and a Web server </li></ul><ul><li>The two most popular Web servers are </li></ul><ul><ul><li>Apache from Apache Software Foundation </li></ul></ul><ul><ul><li>Internet Information Services (IIS) from Microsoft </li></ul></ul><ul><ul><ul><li>The original Web server from Microsoft available on Windows NT was Internet Information Server </li></ul></ul></ul><ul><li>Almost two-thirds of all Web servers use Apache </li></ul>
  • 4. How a Web Server Works <ul><li>As is true with other servers such as DNS, Web servers listen for communication at a port </li></ul><ul><ul><li>The default port is 80 </li></ul></ul><ul><ul><li>You can also create Web servers at port numbers greater than 1023 </li></ul></ul><ul><li>Each Web server has a root, which is where you store the HTML documents </li></ul>
  • 5. Understanding HTTP <ul><li>The current version of HTTP is 1.1 </li></ul><ul><ul><li>Virtually no browsers are so old that they do not support 1.1 </li></ul></ul><ul><li>HTTP is a stateless protocol, meaning that each Web page sent is independent of every other Web page sent </li></ul><ul><ul><li>This makes it more challenging to create a shopping cart application </li></ul></ul>
  • 6. Understanding HTTP <ul><li>HTTP 1.1 supports persistent connections </li></ul><ul><ul><li>This allows the browser to receive multiple files in one TCP connection </li></ul></ul><ul><ul><li>This can speed up communication </li></ul></ul><ul><ul><li>Although you see a single page in your browser, it can be composed of many text and image files </li></ul></ul>
  • 7. Understanding HTTP <ul><li>When the browser sends a request to a Web server, it looks like: </li></ul><ul><li>GET /hello.htm HTTP/1.1 </li></ul><ul><li>Host: www.technowidgets.com </li></ul><ul><li>The above requests the hello.htm file from the root of the Web server </li></ul><ul><li>It specifies the host of www.technowidgets.com </li></ul><ul><ul><li>There could be multiple hosts at the IP address </li></ul></ul>
  • 8. Understanding HTTP <ul><li>The following shows some of the headers along with the HTML that the Web server would send: </li></ul><ul><li>HTTP/1.1 200 OK </li></ul><ul><li>Server: Microsoft-IIS/5.0 </li></ul><ul><li>Content-Type: text/html </li></ul><ul><li>Last-Modified: Fri, 17 May 2005 18:21:25 GMT </li></ul><ul><li>Content-Length: 43 </li></ul><ul><li><html><body> </li></ul><ul><li>Hello, World </li></ul><ul><li></body></html> </li></ul><ul><li>The headers contain information about the page </li></ul>
  • 9. Features in Apache <ul><li>Apache 1.3 was used for many years but version 2.0 was released in 2001 </li></ul><ul><li>Apache can also be used as a proxy server </li></ul><ul><ul><li>A proxy server isolates your real Web server from the Internet </li></ul></ul><ul><li>Apache 2.0 has </li></ul><ul><ul><li>Better support for Windows </li></ul></ul><ul><ul><li>Support for IPv6 </li></ul></ul><ul><ul><li>Simplified configuration </li></ul></ul><ul><ul><li>Unicode support in Windows </li></ul></ul><ul><ul><li>Multilanguage error responses </li></ul></ul><ul><li>Apache supports many programming languages such as Perl and PHP </li></ul>
  • 10. Features in IIS <ul><li>IIS versions associated with Windows versions </li></ul><ul><ul><li>Windows NT – IIS 4.0 </li></ul></ul><ul><ul><li>Windows 2000 – IIS 5.0 </li></ul></ul><ul><ul><li>Windows Server 2003 – IIS 6.0 </li></ul></ul><ul><li>SMTP can be easily added so you can send e-mail from your Web pages </li></ul>
  • 11. Features in IIS 5.0 <ul><li>Web Distributed Authoring and Versioning (WebDAV) </li></ul><ul><ul><li>Allows a server to share Web-based files </li></ul></ul><ul><li>Named virtual hosting </li></ul><ul><ul><li>Multiple Web sites can share a single IP address </li></ul></ul><ul><li>Per Web site bandwidth throttling </li></ul><ul><ul><li>Control bandwidth by Web site </li></ul></ul><ul><li>Kerberos authentication </li></ul><ul><li>Secure Sockets Layer 3.0 </li></ul><ul><ul><li>Encrypted communication </li></ul></ul>
  • 12. Features in IIS 6.0 <ul><li>Increased security </li></ul><ul><ul><li>Default permits only HTML documents </li></ul></ul><ul><li>Expanded language support </li></ul><ul><ul><li>Can use XML and SOAP </li></ul></ul><ul><li>Support for IPv6 </li></ul><ul><li>Increased dependability </li></ul><ul><ul><li>Kernel-mode HTTP service </li></ul></ul><ul><ul><li>Self-healing mechanism </li></ul></ul>
  • 13. Components in IIS <ul><li>File Transfer Protocol (FTP) server </li></ul><ul><ul><li>To transfer files between user and server </li></ul></ul><ul><li>FrontPage 2000 Server Extensions </li></ul><ul><ul><li>Used by programs to transfer files to and from a Web site </li></ul></ul><ul><li>NNTP Service </li></ul><ul><ul><li>Used to create user forums </li></ul></ul><ul><li>SMTP Service </li></ul><ul><li>World Wide Web Server </li></ul>
  • 14. Installing Apache <ul><li>Apache can be installed when you install Linux </li></ul><ul><li>It is also on Red Hat CD 2 </li></ul><ul><li>If you install it from the Red Hat CD, the directories will be consistent with other server applications </li></ul><ul><li>If you download it from the Apache Web site, you have to compile it and install it </li></ul>
  • 15. Starting Apache <ul><li>By default, Apache does not start after you install it </li></ul><ul><li>The following table has a list of commands </li></ul>apachectl restart Restart Apache apachectl stop Stop Apache apachectl start Start Apache Command Procedure
  • 16. Minimal Apache Configuration <ul><li>Add a ServerName in /etc/httpd/conf/httpd.conf </li></ul><ul><li>Add apachectl start to /etc/rc.d/rc.local </li></ul>
  • 17. Default Web Site Properties in IIS
  • 18. Tabs on the Default Web Site Properties Dialog Box <ul><li>Operators (Windows 2000) only </li></ul><ul><ul><li>This property lists users who can administer Web site </li></ul></ul><ul><li>Performance </li></ul><ul><ul><li>Limit bandwidth by Web site </li></ul></ul><ul><ul><li>Limit simultaneous connections (Windows 2003) </li></ul></ul><ul><li>ISAPI Filters </li></ul><ul><ul><li>Specify applications that process HTTP requests </li></ul></ul>
  • 19. Tabs on the Default Web Site Properties Dialog Box <ul><li>Home Directory </li></ul><ul><ul><li>Specifies the location and properties of the root </li></ul></ul><ul><ul><li>Log information here </li></ul></ul><ul><ul><li>Permissions </li></ul></ul><ul><li>Documents </li></ul><ul><ul><li>Configure the name for default Web pages </li></ul></ul><ul><li>HTTP Headers </li></ul><ul><ul><li>Add your own custom headers </li></ul></ul><ul><li>Custom Errors </li></ul><ul><ul><li>Create custom pages for HTTP errors </li></ul></ul>
  • 20. Apache Properties- Global Environment <ul><li>ServerRoot </li></ul><ul><ul><li>Directory location of server files </li></ul></ul><ul><li>KeepAlive </li></ul><ul><ul><li>Indicates whether Apache should maintain a persistent connection </li></ul></ul><ul><li>Listen </li></ul><ul><ul><li>Determines the port number for the server </li></ul></ul><ul><ul><li>Default is 80 </li></ul></ul>
  • 21. Apache Properties- Main Server Configuration <ul><li>User </li></ul><ul><ul><li>Shows the user name that Apache employs when someone requests a Web page </li></ul></ul><ul><ul><li>The default is apache </li></ul></ul><ul><li>ServerAdmin </li></ul><ul><ul><li>E-mail address of administrator </li></ul></ul><ul><li>ServerName </li></ul><ul><ul><li>DNS host name or IP address of server </li></ul></ul><ul><li>DocumentRoot </li></ul><ul><ul><li>Directory where the Web pages are stored </li></ul></ul>
  • 22. Hosting Multiple Web Sites by Port Number <ul><li>Associate each new Web site with a port above 1023 </li></ul><ul><li>To retrieve a Web page from a site at port 8080 </li></ul><ul><ul><ul><li>www.technowidgets.com:8080/prod.htm </li></ul></ul></ul><ul><li>Because it requires a user to add the port number, it is not a popular method </li></ul>
  • 23. Hosting Multiple Web Sites by IP Address <ul><li>You can create multiple IP addresses on a single NIC </li></ul><ul><ul><li>Referred to as virtual IP addresses </li></ul></ul><ul><li>Useful for flexibility because if each domain has its own unique IP address, you can easily move the domain to a different Web server </li></ul><ul><li>It is getting more expensive to get multiple IP addresses from an ISP </li></ul>
  • 24. Hosting Multiple Web Sites by Host Name <ul><li>Multiple host names can be associated with a single IP address </li></ul><ul><li>Getting a single IP address from your ISP is relatively inexpensive </li></ul><ul><li>You can host an almost unlimited number of domains with a single IP address </li></ul><ul><li>It is the most common method of hosting </li></ul>
  • 25. Configuring a Virtual Host Based on an IP Address in Apache <ul><li>In /etc/rc.d/rc.local, add an IP address such as: </li></ul><ul><ul><li>/bin/ifconfig eth0:0 192.168.0.150 </li></ul></ul><ul><li>In the Virtual Host section of httpd.conf </li></ul><ul><ul><li><VirtualHost 192.168.0.150> ServerName research.technowidgets.com DocumentRoot /var/www/research </VirtualHost> </li></ul></ul>
  • 26. Configuring a Virtual Host Based on a Host Name in Apache <ul><li>NameVirtualHost defines the common IP address </li></ul><ul><li>Multiple configurations repeat the same IP address and define unique ServerName settings </li></ul><ul><li>NameVirtualHost 192.168.0.100 </li></ul><ul><li><VirtualHost 192.168.0.100> </li></ul><ul><li>ServerName www.technowidgets.com DocumentRoot /var/www/html </VirtualHost> <VirtualHost 192.168.0.100> ServerName web1.technowidgets.com DocumentRoot /var/www/web1 </VirtualHost> </li></ul>
  • 27. Configuring a Virtual Directory in Apache <ul><li>The following associates the virtual directory called prod with the location of the directory </li></ul><ul><li>Alias /prod/ “/var/www/prod/” </li></ul><ul><li>Then it configures the directory </li></ul><ul><li><Directory “/var/www/prod”> AllowOverride None Order allow, deny Allow from all </li></ul><ul><li></Directory> </li></ul>
  • 28. Summary <ul><li>Web servers use HTTP to send HTML documents </li></ul><ul><li>IIS is from Microsoft while Apache is from Apache Software Foundation </li></ul><ul><li>IIS modifications are made through property pages </li></ul><ul><li>Apache modifications are typically made by changing /etc/httpd/conf/httpd.conf </li></ul>
  • 29. Summary <ul><li>You can create multiple Web sites on a single computer by adding port numbers, IP addresses, and/or host names </li></ul><ul><li>Virtual directories are directories that appear to be located beneath the root, yet are physically located elsewhere </li></ul>

×