Вы находитесь на странице: 1из 24

Web Service Administration

Chapter Goals
Understand the terminology of the WWW. Understand web clients (browsers). Understand web servers. Setup a web service

Web Services
What is the World Wide Web (WWW)?
he World Wide Web is a client!server based application originally developed to distribute documentation.
"esearchers at various locations# notably the $ational %enter for Supercomputer &pplications at the University of 'llinois# e(tended the original design to include the distribution of a wide variety of media including graphics# audio# video# small applications or applets.

Web Services
WWW clients, known as browsers, make requests from WWW servers and display the results in the form of a page. Pages and other resources are referenced using a universal resource locator (UR !. "he format of a UR is a resource type tag, followed by the name of the system holding the resource, followed by the path to the resource that may include option flags and other data. Web pages are written in #yper"e$t %arkup anguage (#"% !. ) & single web page may include te$t, graphics and other elements from one or more servers. ) #"% and the format of other page elements are standardi'ed allowing a given web page to be rendered and viewed on a wide variety of web browsers. ) Web pages can also include forms and buttons. "hese allow data to be entered into the page via the web browser and communicated back to the web server.

Web Services
Web %lients
&dministrating WWW clients is primarily a matter of *eeping up to date with browser and page content development. &t present# leading browsers are undergoing rapid development. $ew versions of some browsers are available as fre+uently as every few wee*s. $ew page content in the form of new media data types are continually being developed. $ot all media types are directly viewable by a given browser and not all pages follow the , -. specifications closely enough to be properly rendered by all browsers. &dditional software may be needed to view certain content types such as video # animated pictures and menus. Such additions to the browser come in two flavors/ (0) e(tensions to the browser program itself# often called plug!ins# or (1) separate applications started under the browser2s control# *nown as helper applications.

Web Services
3lug!ins
3lug!ins can be categori4ed into two ma5or groups based on the application!programming interface (&3') they use. 6ne group is designed for -icrosoft2s 'nternet 7(plorer &3'# and the other group is based on the $etscape &3'. -ost browsers# such as -o4illa# 6pera# 8on+uerer# use the $etscape &3' and are able to ma*e use of plug!ins designed for that &3'. 3lug!ins are further categori4ed by processor architecture and operating system li*e other application software. &s one would e(pect# the widest selection of plug!ins for various media types is for 'nternet 7(plorer on -icrosoft Windows on 'ntel processors. 9ewer plug!in choices are available for -ac 6S : and .inu( and very few plug!ins are available for other U$': variants.

Web Services
,elpers
,elper applications are standalone programs that the browser runs to display content in formats not supported by the browser itself or a plug! in. & typical helper is "eal2s "eal3layer audio and video player. When a user clic*s on a lin* to a "eal3layer video clip# the browser starts the player and passes along the U". or downloads the video clip and passes the filename of the clip to the player depending on how the clip is specified on the page. he system administrator needs to be aware of the media types his users will need to view. -acromedia2s 9lash animation player plug!in and "eal2s "eal3layer audio and video player are two typical additions to the base web browser that are widely used to display content found on many web sites. Some sites offer less common media types such as ;"-. or other <= images# Window2s media player audio or video# >uic*time video# and others.

Web Services
Web Servers
'nstalling and configuring a Web server is a much more involved process than configuring a web browser.
& Web server is a very comple( daemon with numerous features that are controlled by several configuration files. Web servers not only access files containing web pages# graphics and other media types for distribution to clients# they can also assemble pages from more than one file# run %?' applications# and negotiate secure communications. Security and performance issues are near the top of the list when choosing# installing and configuring any web server.

Web Services
%hoosing a Web Server
%hoosing a web server involves an evaluation of several related factors.
Security Web servers that serve web pages on the 'nternet face an e(tremely hostile environment. hey are the point of attac* for persons interested in entering a system# stealing data or simply defacing web pages. Web servers must properly handle a wide range of input data without fail. 3rograms run via the web server such via the %ommon ?ateway 'nterface (%?') must li*ewise deal with possibly malicious input data and e(plicit attempts to e(ploit them.

Web Services
%hoosing a Web Server
3erformance Serving web pages is often a highly '@6 intensive tas*.
-any web page are constructed Aon the flyB from the output of programs or as the result of a database +uery. he performance of a web site is dependant on the performance of all the components that feed into the web pages being served. 'ncluded in this is the performance of the system the web server resides on# the networ* it is connected to and the data storage facility being used.

Web Services
%hoosing a Web Server
&vailability Some web servers are available for only one operating system platform.
Some %?' programs# database interconnections and other data sources are available for only selected platforms. & careful inventory of the desired %?' programs and data sources is helpful in reducing the range of choices to those where the needed software is available. ;iewed another way# if a specific platform has already been selected# a review of the web servers# %?' programs# etc. that are available for the selected platform can help guide the development of the web site.

11

Web Services
%hoosing a Web Server ''S and &pache are the most widely used web servers
W&"$'$?/ Cased on a long string of security problems, culminating in the infamous %ode "ed and $imda worms# many organi4ations have moved away from -icrosoft2s 'nternet 'nformation Server (''S) web server. -oving away from ''S is also the recommendation of the ?artner ?roup. 12

Web Services
&pache
he most widely used web server on the 'nternet# &pache# is available for all U$': variants and Windows $ and later.
-any U$': variants such as Ubuntu# "ed ,at .inu(# -ac 6S : and Solaris ship &pache as part of the operating system distribution. 9or those that do not# &pache is freely available in source code form from http/@@www.apache.org@ &side from its wide acceptance# &pache offers a comprehensive suite of configuration options and features found on many other web servers.

13

Web Services
Server &dd!ons
'f a web server were all that was needed to set up a web site# life would be pretty easy for the system administrator and web master. ,owever# the typical web server is e(tendable via several methods. %?'# &pplication Servers and -odules are Server &dd!ons %ommon ?ateway 'nterface (%?') he most common route to e(tending the functionality of the web server is via %?'. Web pages can refer to %?' programs and data from forms can be passed to them. Web pages can be created on the fly by %?' programs that send data via the web server directly to the client web browser. %?' programs might be 3erl scripts# 3ython scripts# or even compiled binaries.

14

Web Services
Server &dd!ons
&pplication Servers ools such as Dope and php provide templates for building web pages.
hese templates form an entry point into a scripting language and access to databases easing the development of dynamically created web pages.

-odules &nalogous to web browser plug!ins# modules e(tend the web server by directly adding functions.
.i*e web browser plug!ins# modules are specific to a particular web server and match that web server2s &3'. Status reporting# performance enhancements such as a built!in 3erl interpreter# encryption utilities# and even U". spelling correction are some of the modules that are available for the &pache web server.

15

Web Services
Web Server 'nstallation
&pache is available in both binary form from some vendors and in source code form for all systems. While a binary distribution saves time# it does not offer the level of control that building from sources offers. o prepare for an installation from source code# ma*e an inventory of the &pache modules that the web site will re+uire. &lso# chec* that the needed build tools are available.

16

Web Services
Web Server 'nstallation
&pache is built using the Aconfigure and ma*eB procedure common for many open source pac*ages. .i*e other pac*ages that use the configure utility# typing Aconfigure !!helpB will produce a list of all of the available option flags. &dditional modules not found in the base &pache distribution may re+uire additional wor*. 9or e(ample# adding modEssl# to provide secure web connections re+uires that the 6penSS. pac*age be installed first and that an environment variable# SS.EC&S7# containing the path to 6penSS. be set when &pache is configured. 17

Web Services
Web Server %onfiguration
%urrent versions of the &pache web server are configured via a series of directives *ept in a plain te(t file# httpd.conf. he &pache server distribution includes a set of samples files that the system administrator can modify. 6ver 0FF configuration options can be applied to control the behavior of the &pache Web server. =irectives in the configuration files are case insensitive# but arguments to directives are often case sensitive. .ong directives can be e(tended by placing a bac*slash at the end of the line as a continuation character. .ines beginning with a pound sign (G) are considered comments. & few of the most basic options to be e(amined upon setting up a new Web server are e(amined in the ne(t section.

18

Web Services
Casic &pache =irectives
&t a minimum# the system administrator will want to modify the User# ?roup# Server&dmin# Server"oot# Server$ame and =ocument"oot lines to reflect the local site. he User and (roup lines specify the user id and group id that the Web server will operate under once started. he )erver&dmin is an e!mail address to which the server can send problem reports. he )erverRoot specifies the installation directory for the server. he )erver*ame is the name of the server returns to clients. he +ocumentRoot directive sets the base for the default web page for the web server.

19

!nstallin" Apache2
o install apache1 without a graphical interface/ sudo apt,get install apache%hec* if it sudo apt,cache search apache- . less Cy default# @var@www is where the static website resides. Cy default# @usr@lib@cgi!bin contains scripts that are e(ecuted when someone browses http/@@website@cgi!bin@script Crowse the website/ http/@@localhost
2

!nstallin" Apache2
Cy default# apache reads the server name from the =$S. 'f we donHt have a name in the =$S and we want to use the '3# we need to set/ )erver*ame /0./0.12.-0 in @etc@apache@apache1.conf (set it to your '3 address) o access the manual/ http/@@localhost@doc@apache1!doc@manual@
21

#ro$bleshootin" Apache

o chec* whether there are errors in the configuration file type/ apache-ctl configtest his should be always a good thing to do before restarting or reloading apache
read logs in @var@log@apache1@ if you donHt see your changes#it can be that you have the old page in the cache of the browser

22

!nstallin" %&%

3,3 for Server!side Scripting o install 3,3/


apt,get install libapache-,module,php1 then by default# every file .php is e(ecuted as php est php file/
34 phpinfo(! 45

23

!nstallin" '(S)*

-yS>. for database driven webservice o install -yS>./


apt,get install mysql,client mysql,server %reate a database with/ create database students ?ive a use access to the database/ grant all on students.6 to sisay7 grant all on students.6 to sisay identified by 8mypassword87 -ore info on/

http/@@www!css.fnal.gov@dsg@e(ternal@freeware@mys+l&dmin.html

o use -yS>. from 3,3/ apt,get install php1,mysqli php1,mysql

24

Вам также может понравиться