Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Server Side Includes (SSI) Instructor: Joseph DiVerdi,

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

CS 22: Enhanced Web Site Design - Week 8Slide 1 of 15 Enhanced Web Site Design Stanford University Continuing Studies CS 22 Mark Branom
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
Server-Side vs. Client-Side Scripting Languages
1 Chapter 12 Working With Access 2000 on the Internet.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Introduction to eValid Presentation Outline What is eValid? About eValid, Inc. eValid Features System Architecture eValid Functional Design Script Log.
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
Introduction to JavaScript Form Verification - Fort Collins, CO Copyright © XTR Systems, LLC Verifying Submitted Form Data with JavaScript Instructor:
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
INTRODUCTION TO WEB DATABASE PROGRAMMING
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
ITD 3194 Web Application Development Chapter 4: Web Programming Language.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Webmaster Overview Fort Collins, CO Copyright © XTR Systems, LLC Webmaster Overview Instructor: Joseph DiVerdi, Ph.D., MBA.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Using Embedded JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Embedding JavaScript In HTML Instructor: Joseph DiVerdi, Ph.D., MBA.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
CSU - DCE Internet Security... Privacy Overview - Fort Collins, CO Copyright © XTR Systems, LLC Setting Up & Using a Site Security Policy Instructor:
CSU - DCE Advanced Perl CGI Operation - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) on the.
Universiti Utara Malaysia Chapter 3 Introduction to ASP.NET 3.5.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Web Site Access Control with Apache Fort Collins, CO Copyright © XTR Systems, LLC Web Site Access Control Using the Apache Web Server Instructor: Joseph.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Web Robots, Crawlers, & Spiders Webmaster- Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Web Robots, Crawlers & Spiders Instructor: Joseph.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
CSU - DCE Advanced Perl First Web Page - Fort Collins, CO Copyright © XTR Systems, LLC Creating Your First Web Page Instructor: Joseph DiVerdi,
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
Fall 2004CSI University of Ottawa Introduction to PHP Basic principles and syntax.
CSU - DEO Introduction to CGI - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) Instructor: Joseph DiVerdi,
A Little Bit About Cookies Fort Collins, CO Copyright © XTR Systems, LLC A Little Bit About Cookies Instructor: Joseph DiVerdi, Ph.D., M.B.A.
 Apache 2.2 › /usr/ports/www/apache22 › apache22_enable="YES" (/etc/rc.conf) › /usr/local/etc/rc.d/apache22 start  MySQL 5.0 › /usr/ports/databases/mysql50-server.
Introduction to JavaScript CS101 Introduction to Computing.
CSU - DCE Webmaster I Design with HTML #1 - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites using HTML #1 Instructor: Joseph DiVerdi,
XP Tutorial 8 Adding Interactivity with ActionScript.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Intermediate CGI & CGI.pm Webmaster II - Fort Collins, CO Copyright © XTR Systems, LLC CGI Programming & The CGI.pm Perl Module Instructor: Joseph DiVerdi,
Introduction & Overview Introduction to PHP - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi,
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Creating a Remotely-Hosted Web Site Fort Collins, CO Copyright © XTR Systems, LLC Creating Your First Remotely-Hosted Web Site Instructor: Joseph DiVerdi,
Security Issues with PHP  PHP installation  PHP programming Willa Zhu & Eugene Burger.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Introduction to JavaScript Fort Collins, CO Copyright © XTR Systems, LLC Introduction to JavaScript Programming Instructor: Joseph DiVerdi, Ph.D., MBA.
30 Copyright © 2009, Oracle. All rights reserved. Using Oracle Business Intelligence Delivers.
Sessions and cookies (part 2) MIS 3501, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/19/2015.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
PHP Introduction & Overview Fort Collins, CO Copyright © XTR Systems, LLC Introduction to & Overview of PHP Instructor: Joseph DiVerdi, Ph.D., MBA.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
CSU - DCE Webmaster I HTML & URLs - Fort Collins, CO Copyright © XTR Systems, LLC Designing Web Sites With HTML - Using Effective Links Instructor:
Web Development Web Servers.
Introduction and Principles
A Method To Minimize HTML Code Duplication
Database Driven Websites
Configuring Internet-related services
Intro to PHP.
An Introduction to JavaScript
Web Application Development Using PHP
Presentation transcript:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Introduction to Server Side Includes (SSI) Instructor: Joseph DiVerdi, Ph.D., MBA

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Server Side Includes Server-Side, HTML-Embedded Language –Directives Included in HTML Document Also Known As Commands or Placeholders –Replaced By The Server With HTML Content Never Seen By the Browser Looks Just Like Regular-old HTML Not So Powerful As CGI Saves You the Trouble of Writing Complete CGI Programs

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Server Side Includes Server Receives Request for Document Server Examines Document Content –Looking for SSI Directives Process Known As "Parsing the File" Server Replaces Directives With HTML Data –Current Time & Date –Contents of Another File –Last Modified Time & Date Transmits Document to Client

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Interaction

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Usage Create Framework for Pages Which Are Dynamically Generated –Elements Which Are Repeatedly Used Navigation Bar or Header –Elements Which Are Changing Message of the Day Last Modified Date Current Time & Date –Elements Dependent on Environment Variables Content Varied by Browser Type

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Advantages There Are Many Advantages To Using SSI: –Shallow Learning Curve Fairly Easy To Learn –Broad Support of SSI by Several Different Servers –Up-To-The-Minute Information to Viewers –No Browser Dependence Like JavaScript Dependent Upon Server –SSI Cannot Be Seen by Viewers Unlike JavaScript –Easier to Implement Than Full-up CGI Programs

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Disadvantages Yes, There Are Some Disadvantages: –It Takes More Work for Server to Parse & Deliver Documents Than to Deliver Documents Slower Response Per Document and/or Limited Ability to Handle High Request Rate –Greater Security Risk Principally If Command Execution is Enabled –SSI Directives Are Limited In Power Need More? Use PHP and/or CGI

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC To Use Or Not To Use A Matter of How Much of the Page Is Static –How Much Needs to Be Recalculated Every Time the Page Is Served SSI Is a Great Way to Add Small Pieces of Information If a Majority of Your Page Is Being Generated at the Time That It Is Served, You Need Another Solution

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Syntax All SSI Directives Use the Format: Where: –Directive Is Contained in an HTML Comment –Command Begins With a Sharp - "#" –There Is No Space Between Comment Start & Sharp –Command Is an SSI Keyword –arg1, arg2,... Are the Names of the Arguments –value1, value2,... Are the Values of The Arguments –Quotes Are Not Always Required Around Values But a Very Good Idea

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Syntax Allowed Commands: –echo –include –fsize –flastmod –exec –printenv –set –is, elif, else, endif –config

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC HTML-Embedded Language Before Transmitting Document to Client Server Examines Document Looking for SSI Directives –Also Known As "Parsing the File" Server Then Inserts Requested Data

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Document on Server Current Time It is now:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC HTML received by Client Current Time It is now: 6:10 PM (MT) on May 15, 1865

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Using SSI Current Time It is now: Create a File Named ssi_test.shtml File Must Have a ".shtml" Suffix to Work

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Using SSI Current Time It is now: Last modified:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Using SSI Current Time It is now: Last modified: Welcome to my server at:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Using SSI Current Time It is now: Last modified: Welcome to my server at: Your host's IP address is: Your host's name is:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Dynamic Content Using SSI Current Time It is now: Last modified: Welcome to my server at: Your host's IP address is: Your host's name is: Your user agent is:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Environment Variables Create a File Named env.shtml

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Server Configuration Server Must Know Which Documents to Parse for SSI Directives –Too Much Server Load to Parse Every Document Several Server Options –Parse Certain Directory or Directories –Parse Documents With Certain Extensions Usually ".shtml" Security-Minded Server Option –Enable External Program Execution

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Server Configuration Site Administrator Enables SSI –On a Directory-By-Directory Basis –Performed Using Server Configuration File –Server Must be Restarted For Changes To Take Effect

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Sample Server Configuration Options MultiViews IncludesNoExec AllowOverride FileInfo AuthConfig Limit "Options Includes" –Server-Side Includes Are Permitted "Options IncludesNoExec" –Server-Side Includes Are Permitted –The #exec Command Is Disabled linus Is Configured With IncludesNoExec

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Server Configuration Site Administrator May Set Server Configuration To Permit You To Enable SSI Yourself –Using Directory-Specific htaccess Files Directives Are Not Just For Authentication They Are General Purpose Tools

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Server Configuration Options MultiViews AllowOverride FileInfo AuthConfig Limit Options "AllowOverride Options" –Permits the Web Developer to Enable Certain Features & Functions –On a Directory-by-directory Basis –Using htaccess Files

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Sample htaccess File Options +IncludesNoExec –Server-Side Includes Are Permitted –The #exec Command Is Disabled –Plus Indicates That This Directive Merges Options Directives With Those Already In Effect Rather Than Superceding Them The Use of This Directive Is Not Necessary On linus Because SSI Is Already Enabled

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Without Extensions Server Efficiency Requires Selective Use of SSI –Because of Additional Server Load Caused by Document Parsing Using a Special Extension Is One Way to Do It –Obvious to Knowledgeable Viewer –Inclusion or Exclusion Requires Links Update It Is Possible to Identify SSI Documents –Behind the Scenes –Without the Use of a Special Extension –Without Letting the Viewer Know About It

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Without Extensions Use a Directive Known As XbitHack –Enable SSI in a Particular Directory or Entire Server Same Location Rules As Options & AllowOverride Directives Used in Server Configuration File or htaccess Files Use File Permissions –Enable SSI on a Particular File

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Without Extensions Use a Directive Known As XBitHack –Enable SSI in a Particular Directory or Entire Server Same Location Rules As Options & AllowOverride Directives Used in Server Configuration File or htaccess Files Use File Permissions –Enable SSI on a Particular File This is Only Available on UNIX Servers –Because Only UNIX Offers Suitable File Permissions

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC XBitHack Directive Syntax: XBitHack on | off | full –Default is off –off - No special treatment of executable files –on - Any File That With User-Execute Bit Set Will Be Treated As an SSI HTML Document User-Execute Bit Is Also Known As Owner-Execute Bit –full - For More Information See:

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Adding a htaccess File Create htaccess File in Your HTML Directory Edit It to Include the Following: XBitHack on That's It

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Setting the User-Execute Bit Standard Procedure –Provide the Minimum Amount of Permission to Each File to Accomplish Goal For HTML Files This Means 644 in Octal Format rw-r--r-- in Bit Format –User: Read, Write –Group: Read –Other: Read

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Setting the User-Execute Bit To Signal That a Particular HTML File Contains SSI Turn on the User Execute Bit For HTML Files This Means 744 in Octal Format rwxr--r-- in Bit Format –User: Read, Write, Execute –Group: Read –Other: Read

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC SSI Without Extensions Modify ssi_test.shtml File –Change Extension to ".html" Use Html-Kit to Accomplish This Task –Change Permission From 644 to 744 Use Tera Term Pro to Accomplish This Task –Log In to Your Account –Navigate to Appropriate Directory Using cd Command cd html –Use Change Mode Command: chmod 744 ssi_test.html Test ssi_test.html Using Your Browser

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC The #exec Command

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Including Files

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Included Files & LAST_MODIFIED

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Conditional Execution

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Modifying Timestamp Format

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Accessing the Query String

Introduction to Server Side Includes Fort Collins, CO Copyright © XTR Systems, LLC Apache SSI Documentation Apache Organization "How-To" Apache Week Short Tutorial