1 / 21

CIS 451: Servers, CGI and Log Files

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

nikkos
Download Presentation

CIS 451: Servers, CGI and Log Files

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 451: Servers, CGI and Log Files Dr. Ralph D. Westfall January, 2009

  2. 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

  3. 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"

  4. Server Options • your own server at your location • phone DSL, T1, cable connection, etc. • colocation: your server at their location • 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

  5. 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

  6. 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

  7. CGI "Scripting" Languages • interpreted • UNIX shell scripts (like DOS bat files) • Perl, Python and PHP • other scripting languages • compiled • C/C++ programs • other executables

  8. CGI on a Search Engine • browser requests URL from server • http://www.google.com/search?q=free • 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

  9. Passing Information to CGI • essentially same as for HTML form sending data to ASP.NET • <form action="cgi-bin/script.pl" method="get"> • "get" appends data to URL (URL encoding) • .pl is common extension for Perl files • <form action="cgi-bin/script.pl" method="post"><!- different route ->

  10. Using CGI Scripts • server must allow you to run scripts • poorly written scripts vulnerable to hackers • load script in appropriate directory • usually /cgi-bin • set permissions (Cal Poly) so file is executable • 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)

  11. 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)

  12. 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

  13. 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%

  14. 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

  15. Free Log File Analysis Services • Webstat (free), • cut and paste JavaScript into your site • adds a small logo • provides extensive statistics • current month • historical • GoStats • eXTReMe Tracking most popular free?

  16. Implications of Log Data? • page design • good pages, bad pages • types of customers • keywords to emphasize in page content • marketing techniques • referring pages

  17. 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?

  18. 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

  19. Income from Web Advertising • impressions • CPM (cost per 1000) • typical rates $10 - $30/1000 visitors • need to have at least 10,000 visitors/month • click-throughs • commissions on sales, e.g. Amazon • up to 15% on sales of specified items • other "affiliate programs" (link) • web income calculator

  20. 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

  21. 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?

More Related