Ch 22: Web Hosting  and Internet Servers LaShall Bates
Web Hosting Providing Raw web pages (HTML) FTP SSL Streaming audio or video
Linux vs. Windows hosting??? Linux provides Maintainability and performance Multi user, interactive OS Multi task Administration Can be tuned to be faster
The Basics A  web server  is a system configured to answer HTTP requests. Browsers contact these remote web servers and make requests on behalf of users.  To convert a generic Linux system, install a daemon that listens for connections on TCP port 80, accepts requests for docs and transmits them to the requesting user.
URL U niform  R esource  L ocator,  the global address of docs and other resources on the WWW.  5 parts of the address 1. What protocol to use 2. IP address or the domain name where the resource is located.  3. TCP/IP port (opt) 4. Directory (opt) 5. Filename (case sensitive)
URL ex. An executable file that should be fetched using the FTP protocol ftp://uark.edu/stuff.exe A Web page that should be fetched using the HTTP protocol  http://uark.edu/classes/index.html
URL Protocols http - hypertext transfer protocol (WWW)  https - secure http (use HTTP/SSL ftp - file transfer protocol (FTP)  news - Usenet news protocol  javascript - local javascript execution  file - local files on local computer  mailto - sends mail to specified e-mail address telnet - used to open telnet sessions  ldap – access LDAP directory services
How HTTP works H yper T ext  T ransfer  P rotocol , the underlying protocol used by the WWW.  HTTP defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands.  For example, when you enter a URL in your browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page.
HTTP: Stateless Protocol HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. This is the main reason that it is difficult to implement Web sites that react intelligently to user input.
CGI The shortcoming of HTTP is being addressed in a number of technologies, including CGI, ActiveX, Java, JS and cookies.  CGI is a specification that allows the designer to provide active changing web content. It allows the HTTP server to exchange info with other programs.
CGI: generating on the fly CGI scripts can be C(++), Perl, Python or any other program that can perform real-time I/O
CGI: security CGI poses a security problem for Admins.  It can potentially allow anyone to run a program on your server and/or gain access to files.
Load balancing Hits/page views a server can handle.  Dependent on  Operating system System tuning Hardware architecture Construction of site More important: Scalability Products spread the work specified by a variety of admin-config params such as individual server response time and availability
Choosing a Server Robustness Performance Timeliness of updates and bug fixes Availability of source code Cost Access control and security Ability to act as a proxy Ability to handle encryption
Apache The August 2002  Netcraft Web Server Survey  found that 63% of the web sites on the Internet are using Apache, thus making it more widely used than all other web servers combined.
Apache The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache,  well-known for their superior skills in warfare strategy and their inexhaustible endurance .  Secondarily, and more popularly (though incorrectly) accepted, it's a considered cute name which stuck. Apache is " A PA t CH y server". It was based on some existing code and a series of "patch files".
Installing Apache If you want to compile source code yourself ./configure –prefix=/etc/httpd/ Include or remove features enable-module=, disable-module= For a complete list of modules  http://httpd.apache.org/docs/mod/ Run  make , then  make install  to compile and install appropriate files
Configuring Apache After installation, configure setup conf directory (/etc/httpd/conf) 3 files to configure httpd.conf srm.conf access.conf
Apache Conf files: httpd httpd.conf How Apache daemon interacts with system. Set TCP port location of log files various network and performance params Configure virtual connections
Apache Conf files: srm srm.conf Controls resources server needs DocumentRoot  def: defines root of directory tree in which servable docs are located.  Also handling of “special” URLs (ex. http://comp.uark.edu/~crane)
Apache Conf files: access access.conf Security concerns Directives that control access on a per-file pr per-dir basis, prevents access to sensitive files vs. httpd Use option  ExecCGI  in srm.conf to enable CGI restrictions Allows two access controls one for entire doc dir and one for cgi-bin.
Running Apache Start by hand /usr/sbin/httpd –f /etc/httpd/conf/httpd.conf or from rc scripts Run at boot time make link in  rc  directory that points to /etc/init.d/httpd file Start late in booting sequence after daemons that manage functions such as routing and time synchronization have started
High performance Hosting TUX is an architecture for kernel-accelerated network services. Runs in conjunction with Apache Serves up static pages without leaving kernel space.  Minimizes context switches with a zero-copy architecture. Not recommended for beginners
Virtual Interfaces Allowing the hosting of more than one web site by associating more than one IP address with a system.  Allows daemon to identify request’s destination IP address. Single Linux machine responds on the network to more IP addresses than it has physical network interfaces.  Each of the result “virtual” network interfaces can be associated with a corresponding domain name that users on the Internet might want to connect to.
Needs of Virtual Interfaces Create the virtual interface at TCP/IP level ifconfig eth0:0 128.138.243.150 netmask 255.255.255.255.192 up To make permanent modify startup Tell Apache server about virtual interfaces created. Add  VirtualHost  clause to httpd.conf file One for each virtual interface
Caching and Proxy Servers Squid Internet Object Cache Caching and proxy server that runs under Linux and supports several protocols How it works Client browser contacts squid to request object Squid makes request on client’s behalf (or finds cached copy) and returns result to client Proxy servers can enhance security or filter content
Anonymous FTP server Lets users have accounts to download files you have made available. Create user-------------------------------- Create the user  ftp  in  /etc/passwd .  Misc group, let ~ftp be root you wish anon. users to see.  Use invalid psw and use shell for better security ftp:*:400:400:Anonymous FTP:/home/ftp:/bin/true
Anonymous FTP: create user dir Home directory: Owned by root, same group as ftp, so Group permissions will be for anonymous users Set the permissions for  ~ftp  to 555 (read, nowrite, execute). Create subdirs: bin, etc, lib, and pub Copy ls program to ~ftp/bin and its shared libraries to ~ftp/lib Copy /etc/passwd and group files to ~ftp/etc Should only contain users root, daemon, and ftp Replace psw with *’s
Anonymous FTP: Use Put files you want to make available in ~ftp/pub
Questions References: http://Apache.org http://webopedia.com http://squid.nlanr.net/

More Related Content

PPT
are available here
PPT
WE18_Performance_Up.ppt
PDF
[MathWorks] Versioning Infrastructure
PDF
Configuring the Apache Web Server
PPTX
Apache web service
PDF
Apache web server tutorial for linux
PPTX
Apache web server
PPTX
Apache server configuration & optimization
are available here
WE18_Performance_Up.ppt
[MathWorks] Versioning Infrastructure
Configuring the Apache Web Server
Apache web service
Apache web server tutorial for linux
Apache web server
Apache server configuration & optimization

What's hot (18)

PPTX
Apache web server
ODP
Apache ppt
PDF
Apache Tutorial
PDF
Apache Manager Table of Contents
PPT
Lamp technology
PPTX
Apache web server
PPT
Apache Web Server Setup 4
PPT
Apache Web Server Setup 1
PPT
Apache Web Server Architecture Chaitanya Kulkarni
ODP
Apache ppt
PPT
Apache HTTP Server
PDF
PowerPoint Presentation
PPT
Web Server Administration
PPT
A java servers
PDF
A java servers
PPTX
PHP development with Docker
PDF
Docker Security Paradigm
Apache web server
Apache ppt
Apache Tutorial
Apache Manager Table of Contents
Lamp technology
Apache web server
Apache Web Server Setup 4
Apache Web Server Setup 1
Apache Web Server Architecture Chaitanya Kulkarni
Apache ppt
Apache HTTP Server
PowerPoint Presentation
Web Server Administration
A java servers
A java servers
PHP development with Docker
Docker Security Paradigm

Similar to Ch 22: Web Hosting and Internet Servers (20)

PPTX
Apache
PPT
Apache Street Smarts Presentation (SANS 99)
ODP
Nadhiya lamp
PPT
Web Server Administration
PPT
Web Server Administration
PPT
Apache Web Server Setup 3
PDF
LEC_10_Week_10_Server_Configuration_in_Linux.pdf
ODP
Apache ppt
ODP
Babitha.4appach
ODP
Babitha.4appach
PDF
Apache linuxsadsfdsfsdfdsfsdfsdfdsfsdfs.pdf
PDF
Meeting 14. web server ii
KEY
Apache Cookbook - TekX Chicago 2010
ODP
Deepa ppt about lamp technology
ODP
lamp technology
PDF
What's New and Newer in Apache httpd-24
PDF
Using aphace-as-proxy-server
ODP
Apache doc
PPT
Presentation (PPT)
PDF
Linux Servers
Apache
Apache Street Smarts Presentation (SANS 99)
Nadhiya lamp
Web Server Administration
Web Server Administration
Apache Web Server Setup 3
LEC_10_Week_10_Server_Configuration_in_Linux.pdf
Apache ppt
Babitha.4appach
Babitha.4appach
Apache linuxsadsfdsfsdfdsfsdfsdfdsfsdfs.pdf
Meeting 14. web server ii
Apache Cookbook - TekX Chicago 2010
Deepa ppt about lamp technology
lamp technology
What's New and Newer in Apache httpd-24
Using aphace-as-proxy-server
Apache doc
Presentation (PPT)
Linux Servers

More from webhostingguy (20)

PPT
File Upload
PDF
Running and Developing Tests with the Apache::Test Framework
PDF
MySQL and memcached Guide
PPT
Novell® iChain® 2.3
PDF
Load-balancing web servers Load-balancing web servers
PDF
SQL Server 2008 Consolidation
PDF
What is mod_perl?
PDF
What is mod_perl?
PDF
Master Service Agreement
PPT
PPT
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PDF
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
PPT
Managing Diverse IT Infrastructure
PPT
Web design for business.ppt
PPS
IT Power Management Strategy
PPS
Excel and SQL Quick Tricks for Merchandisers
PPT
OLUG_xen.ppt
PPT
Parallels Hosting Products
PPT
Microsoft PowerPoint presentation 2.175 Mb
PDF
Reseller's Guide
File Upload
Running and Developing Tests with the Apache::Test Framework
MySQL and memcached Guide
Novell® iChain® 2.3
Load-balancing web servers Load-balancing web servers
SQL Server 2008 Consolidation
What is mod_perl?
What is mod_perl?
Master Service Agreement
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Managing Diverse IT Infrastructure
Web design for business.ppt
IT Power Management Strategy
Excel and SQL Quick Tricks for Merchandisers
OLUG_xen.ppt
Parallels Hosting Products
Microsoft PowerPoint presentation 2.175 Mb
Reseller's Guide

Ch 22: Web Hosting and Internet Servers

  • 1. Ch 22: Web Hosting and Internet Servers LaShall Bates
  • 2. Web Hosting Providing Raw web pages (HTML) FTP SSL Streaming audio or video
  • 3. Linux vs. Windows hosting??? Linux provides Maintainability and performance Multi user, interactive OS Multi task Administration Can be tuned to be faster
  • 4. The Basics A web server is a system configured to answer HTTP requests. Browsers contact these remote web servers and make requests on behalf of users. To convert a generic Linux system, install a daemon that listens for connections on TCP port 80, accepts requests for docs and transmits them to the requesting user.
  • 5. URL U niform R esource L ocator, the global address of docs and other resources on the WWW. 5 parts of the address 1. What protocol to use 2. IP address or the domain name where the resource is located. 3. TCP/IP port (opt) 4. Directory (opt) 5. Filename (case sensitive)
  • 6. URL ex. An executable file that should be fetched using the FTP protocol ftp://uark.edu/stuff.exe A Web page that should be fetched using the HTTP protocol http://uark.edu/classes/index.html
  • 7. URL Protocols http - hypertext transfer protocol (WWW) https - secure http (use HTTP/SSL ftp - file transfer protocol (FTP) news - Usenet news protocol javascript - local javascript execution file - local files on local computer mailto - sends mail to specified e-mail address telnet - used to open telnet sessions ldap – access LDAP directory services
  • 8. How HTTP works H yper T ext T ransfer P rotocol , the underlying protocol used by the WWW. HTTP defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. For example, when you enter a URL in your browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page.
  • 9. HTTP: Stateless Protocol HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. This is the main reason that it is difficult to implement Web sites that react intelligently to user input.
  • 10. CGI The shortcoming of HTTP is being addressed in a number of technologies, including CGI, ActiveX, Java, JS and cookies. CGI is a specification that allows the designer to provide active changing web content. It allows the HTTP server to exchange info with other programs.
  • 11. CGI: generating on the fly CGI scripts can be C(++), Perl, Python or any other program that can perform real-time I/O
  • 12. CGI: security CGI poses a security problem for Admins. It can potentially allow anyone to run a program on your server and/or gain access to files.
  • 13. Load balancing Hits/page views a server can handle. Dependent on Operating system System tuning Hardware architecture Construction of site More important: Scalability Products spread the work specified by a variety of admin-config params such as individual server response time and availability
  • 14. Choosing a Server Robustness Performance Timeliness of updates and bug fixes Availability of source code Cost Access control and security Ability to act as a proxy Ability to handle encryption
  • 15. Apache The August 2002 Netcraft Web Server Survey found that 63% of the web sites on the Internet are using Apache, thus making it more widely used than all other web servers combined.
  • 16. Apache The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache, well-known for their superior skills in warfare strategy and their inexhaustible endurance . Secondarily, and more popularly (though incorrectly) accepted, it's a considered cute name which stuck. Apache is " A PA t CH y server". It was based on some existing code and a series of "patch files".
  • 17. Installing Apache If you want to compile source code yourself ./configure –prefix=/etc/httpd/ Include or remove features enable-module=, disable-module= For a complete list of modules http://httpd.apache.org/docs/mod/ Run make , then make install to compile and install appropriate files
  • 18. Configuring Apache After installation, configure setup conf directory (/etc/httpd/conf) 3 files to configure httpd.conf srm.conf access.conf
  • 19. Apache Conf files: httpd httpd.conf How Apache daemon interacts with system. Set TCP port location of log files various network and performance params Configure virtual connections
  • 20. Apache Conf files: srm srm.conf Controls resources server needs DocumentRoot def: defines root of directory tree in which servable docs are located. Also handling of “special” URLs (ex. http://comp.uark.edu/~crane)
  • 21. Apache Conf files: access access.conf Security concerns Directives that control access on a per-file pr per-dir basis, prevents access to sensitive files vs. httpd Use option ExecCGI in srm.conf to enable CGI restrictions Allows two access controls one for entire doc dir and one for cgi-bin.
  • 22. Running Apache Start by hand /usr/sbin/httpd –f /etc/httpd/conf/httpd.conf or from rc scripts Run at boot time make link in rc directory that points to /etc/init.d/httpd file Start late in booting sequence after daemons that manage functions such as routing and time synchronization have started
  • 23. High performance Hosting TUX is an architecture for kernel-accelerated network services. Runs in conjunction with Apache Serves up static pages without leaving kernel space. Minimizes context switches with a zero-copy architecture. Not recommended for beginners
  • 24. Virtual Interfaces Allowing the hosting of more than one web site by associating more than one IP address with a system. Allows daemon to identify request’s destination IP address. Single Linux machine responds on the network to more IP addresses than it has physical network interfaces. Each of the result “virtual” network interfaces can be associated with a corresponding domain name that users on the Internet might want to connect to.
  • 25. Needs of Virtual Interfaces Create the virtual interface at TCP/IP level ifconfig eth0:0 128.138.243.150 netmask 255.255.255.255.192 up To make permanent modify startup Tell Apache server about virtual interfaces created. Add VirtualHost clause to httpd.conf file One for each virtual interface
  • 26. Caching and Proxy Servers Squid Internet Object Cache Caching and proxy server that runs under Linux and supports several protocols How it works Client browser contacts squid to request object Squid makes request on client’s behalf (or finds cached copy) and returns result to client Proxy servers can enhance security or filter content
  • 27. Anonymous FTP server Lets users have accounts to download files you have made available. Create user-------------------------------- Create the user ftp in /etc/passwd . Misc group, let ~ftp be root you wish anon. users to see. Use invalid psw and use shell for better security ftp:*:400:400:Anonymous FTP:/home/ftp:/bin/true
  • 28. Anonymous FTP: create user dir Home directory: Owned by root, same group as ftp, so Group permissions will be for anonymous users Set the permissions for ~ftp to 555 (read, nowrite, execute). Create subdirs: bin, etc, lib, and pub Copy ls program to ~ftp/bin and its shared libraries to ~ftp/lib Copy /etc/passwd and group files to ~ftp/etc Should only contain users root, daemon, and ftp Replace psw with *’s
  • 29. Anonymous FTP: Use Put files you want to make available in ~ftp/pub
  • 30. Questions References: http://Apache.org http://webopedia.com http://squid.nlanr.net/