ch 22 web hosting and internet servers l.
Skip this Video
Loading SlideShow in 5 Seconds..
Ch 22: Web Hosting and Internet Servers PowerPoint Presentation
Download Presentation
Ch 22: Web Hosting and Internet Servers

Loading in 2 Seconds...

play fullscreen
1 / 30

Ch 22: Web Hosting and Internet Servers - PowerPoint PPT Presentation

  • Uploaded on

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

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Ch 22: Web Hosting and Internet Servers' - albert

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
web hosting
Web Hosting
  • Providing
    • Raw web pages (HTML)
    • FTP
    • SSL
    • Streaming audio or video
linux vs windows hosting
Linux vs. Windows hosting???
  • Linux provides
    • Maintainability and performance
    • Multi user, interactive OS
    • Multi task Administration
    • Can be tuned to be faster
the basics
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.
  • Uniform Resource Locator, 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
URL ex.
  • An executable file that should be fetched using the FTP protocol
  • A Web page that should be fetched using the HTTP protocol
url protocols
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
How HTTP works
  • HyperText Transfer Protocol, 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: 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.
  • 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: 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: 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
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
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
  • 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.
  • 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 PAtCHy server". It was based on some existing code and a series of "patch files".
installing apache
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
  • Run make, then make install to compile and install appropriate files
configuring apache
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
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
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.
apache conf files access
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
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
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
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
Needs of Virtual Interfaces
  • Create the virtual interface at TCP/IP level
    • ifconfig eth0:0 netmask 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
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
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
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
Anonymous FTP: Use
  • Put files you want to make available in ~ftp/pub