Servers, Log Files, and CGI

Servers, Log Files, and CGI

CIS 451: Servers, CGI and Log Files Dr. Ralph D. Westfall January, 2009 Server Functions deliver files to users manage files that users are requesting example: "could not be found." server side processing run ASP, PHP and CGI scripts

write and/or read databases search engines shopping carts customer services e.g., for credit card accounts Server Functions-2 security owner: can write or delete files on server user has:

read access to html files execute access to "script" files maybe password-protected access to files tracking activity "log files" Server Options your own server at your location colocation: your server at their location

phone DSL, T1, cable connection, etc. high speed access to nearby Internet node you are responsible for technical issues hosting: their server at their location host takes care of most technical issues Popular Server Software Windows Server 2008 (humor) Apache

has some technical advantages is free (open source like Linux) has largest share of market (52%) is the server on Cal Poly Intranet LAMP: Linux, Apache, MySQL, PHP CGI Common Gateway Interface (CGI) is a standard for interfacing applications with servers

is what people used before ASP CGI applications are triggered by users' inputs from browsers provides capabilities that HTML doesn't database read and write complex calculations/data manipulation security CGI "Scripting" Languages interpreted

UNIX shell scripts (like DOS bat files) Perl, Python and PHP other scripting languages compiled C/C++ programs other executables CGI on a Search Engine browser requests URL from server server runs the requested script script calls program to access database database returns data to a script script writes data into a web page server sends this page to browser Passing Information to CGI essentially same as for HTML form sending data to ASP.NET

"get" appends data to URL (URL encoding) .pl is common extension for Perl files

Using CGI Scripts server must allow you to run scripts load script in appropriate directory

usually /cgi-bin set permissions (Cal Poly) so file is executable poorly written scripts vulnerable to hackers chmod 755 (read and execute) in UNIX (right click on file or directory in WS_FTP) may also need to set write permissions for data files (put them in a different directory) ASP vs. CGI Scripts

ASP much easier to use (.NET less so) ASP is growing faster ASP is less powerful (.NET better) not all ISPs offer ASP capabilities UNIX servers need additional software to run ASP or ASP.NET market pressures on ISPs to offer ASP (almost always through IIS, not Apache) Server Log Files HTTP offers extensive capabilities

for tracking users/site visitors HTTP logging stores information when file requested browser name/version referring URL (where user came from) search engine key words to find your site user's IP address Logging Terminology

hits (# of files requested) vs. visitors impressions (CPM) how many visitors possibly adjusted for length of visit ("stickiness" of site) click-throughs CTR (click-through rate) average "click rate" is less than 0.5% Log File Analysis Reports

how long visitor stayed on page and site most popular visit times referring URL which page on your web site visited first page that went to from your web site country (2 characters ending on IP address) .ca=Canada, .fr=France, .kr=Korea Free Log File Analysis Services Webstat (free),

cut and paste JavaScript into your site provides extensive statistics adds a small logo current month historical GoStats eXTReMe Tracking most popular free? Implications of Log Data?

page design good pages, bad pages types of customers keywords to emphasize in page content marketing techniques referring pages Exercise 1a

search for log file analysis software or services post discussion list report on findings number of free, cost range for not free? free vs. not free reports available? other useful features? web-based or need to install on own server? Exercise 1b sign up for free hit counter/log analysis and install it on one of your web pages

post discussion list report ease of use information requested (# of boxes to fill in, # of pages to complete sign-up) how good were the installation instructions any other issues Income from Web Advertising impressions CPM (cost per 1000)

typical rates $10 - $30/1000 visitors click-throughs commissions on sales, e.g. Amazon need to have at least 10,000 visitors/month up to 15% on sales of specified items other "affiliate programs" (link) web income calculator Exercise 2

search for information on affiliate programs find one that looks either very bad or very good look for: rip-offs, outrageous scams, etc. post discussion list report reason it was bad or good product, payment scheme other issues

Exercise 3 find a map that shows locations of major Internet nodes needs to show in relation to an understandable map or find a list of names of cities that have major Internet nodes are these hard to find? why?

Recently Viewed Presentations

  • Broadband fest and famine in Asia ESCAP Sub-Regional

    Broadband fest and famine in Asia ESCAP Sub-Regional

    SDG #9: The clock is ticking! Develop quality, reliable, sustainable and resilient infrastructure, including regional and transborder infrastructure, to support economic development and human well-being, with a focus on affordable and equitable access for all. Significantly increase. access to information...
  • Insitute of Computer Graphics and Algorithms, Vienna ...

    Insitute of Computer Graphics and Algorithms, Vienna ...

    Institute of Computer Graphics and Algorithms Vienna University of Technology Motivation (1) Volumetric data sets: information about interior and exterior of an object Frequently focus objects are occluded by other structures Reduce opacity, cutaways: information is still removed, particularly ...
  • VMS: Volunteer Management System Overview

    VMS: Volunteer Management System Overview

    Initial training of the hours keeper(s) will be conducted by the Implementation Team. The initial training will, usually, be conducted via WebEx (a web based video conference system) The hours keeper will receive training so that they can then train...
  • The Tao of Advising Frannie Miller Academic Advisor

    The Tao of Advising Frannie Miller Academic Advisor

    The Uncarved Block (P'u) Winnie the Pooh is the example of this basic Taoist Principle: "Things in their Natural State" "The essence of the principle of the uncarved block is that things in their original simplicity contain their own natural...
  • First Bit of NGS Variant Calling - Purdue University

    First Bit of NGS Variant Calling - Purdue University

    A FASTQ file (.fq and .fastq) is a text-based file for storing both a biological sequence (usually nucleotide sequence) and its corresponding quality scores. Each entry in a FASTQ file consists of four lines: • Sequence identifier • Sequence •...
  • Citizenship and American Government - Pearl Public School ...

    Citizenship and American Government - Pearl Public School ...

    Materials using sight or sound to present information. Role playing - An instructional technique involving a spontaneous portrayal (acting out) of a situation, condition, or circumstance by selected members of the class ... principles, and concepts for which words are...
  • Organelle Evolution - University of British Columbia

    Organelle Evolution - University of British Columbia

    Degradation of the organelle genomes in pollen could make DNA fragments available for uptake Chloroplast Gene Transfer Plant mitochondria kbp # protein coding genes Wheat mtDNA 452,528 bp Plant mitochondrial genomes undergo intra- or intermolecular recombination via repeated sequences subgenomic...


    A Non-Invasive Magnetic Momentum Monitor Using a TE011 Cavity*. J. Guo#, J. Henry, M. Poelker, R. A. Rimmer, R. Suleiman, H. Wang, JLAB, Newport News, VA 23606, USA