O'reilly CGI Programming.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

O'reilly CGI Programming.Pdf CGI Programming on the World Wide Web By Shishir Gundavaram; ISBN: 1-56592-168-2, 433 pages. First Edition, March 1996. Table of Contents Preface Chapter 1: The Common Gateway Interface (CGI) Chapter 2: Input to the Common Gateway Interface Chapter 3: Output from the Common Gateway Interface Chapter 4: Forms and CGI Chapter 5: Server Side Includes Chapter 6: Hypermedia Documents Chapter 7: Advanced Form Applications Chapter 8: Multiple Form Interaction Chapter 9: Gateways, Databases, and Search/Index Utilities Chapter 10: Gateways to Internet Information Servers Chapter 11: Advanced and Creative CGI Applications Chapter 12: Debugging and Testing CGI Applications Appendix A: Perl CGI Programming FAQ Appendix B: Summary of Regular Expressions Appendix C: CGI Modules for Perl 5 Appendix D: CGI Lite Appendix E: Applications, Modules, Utilities, and Documentation Index Examples - Warning: this directory includes long filenames which may confuse some older operating systems (notably Windows 3.1). Search the text of CGI Programming on the World Wide Web. Copyright © 1996, 1997 O'Reilly & Associates. All Rights Reserved. Chapter 1 1. The Common Gateway Interface (CGI) Contents: What Is CGI? CGI Applications Some Working CGI Applications Internal Workings of CGI Configuring the Server Programming in CGI CGI Considerations Overview of the Book 1.1 What Is CGI? As you traverse the vast frontier of the World Wide Web, you will come across documents that make you wonder, "How did they do this?" These documents could consist of, among other things, forms that ask for feedback or registration information, imagemaps that allow you to click on various parts of the image, counters that display the number of users that accessed the document, and utilities that allow you to search databases for particular information. In most cases, you'll find that these effects were achieved using the Common Gateway Interface, commonly known as CGI. One of the Internet's worst-kept secrets is that CGI is astoundingly simple. That is, it's trivial in design, and anyone with an iota of programming experience can write rudimentary scripts that work. It's only when your needs are more demanding that you have to master the more complex workings of the Web. In a way, CGI is easy the same way cooking is easy: anyone can toast a muffin or poach an egg. It's only when you want a Hollandaise sauce that things start to get complicated. CGI is the part of the Web server that can communicate with other programs running on the server. With CGI, the Web server can call up a program, while passing user-specific data to the program (such as what host the user is connecting from, or input the user has supplied using HTML form syntax). The program then processes that data and the server passes the program's response back to the Web browser. CGI isn't magic; it's just programming with some special types of input and a few strict rules on program output. Everything in between is just programming. Of course, there are special techniques that are particular to CGI, and that's what this book is mostly about. But underlying it all is the simple model shown in Figure 1.1. Figure 1.1: Simple diagram of CGI Acknowledgments CGI Applications Chapter 1 The Common Gateway Interface (CGI) 1.2 CGI Applications CGI turns the Web from a simple collection of static hypermedia documents into a whole new interactive medium, in which users can ask questions and run applications. Let's take a look at some of the possible applications that can be designed using CGI. Forms One of the most prominent uses of CGI is in processing forms. Forms are a subset of HTML that allow the user to supply information. The forms interface makes Web browsing an interactive process for the user and the provider. Figure 1.2 shows a simple form. Figure 1.2: Simple form illustrating different widgets [Graphic: Figure 1-2] As can be seen from the figure, a number of graphical widgets are available for form creation, such as radio buttons, text fields, checkboxes, and selection lists. When the form is completed by the user, the Submit Order! button is used to send the information to the server, which executes the program associated with the particular form to "decode" the data. Generally, forms are used for two main purposes. At their simplest, forms can be used to collect information from the user. But they can also be used in a more complex manner to provide back-and-forth interaction. For example, the user can be presented with a form listing the various documents available on the server, as well as an option to search for particular information within these documents. A CGI program can process this information and return document(s) that match the user's selection criteria. Chapter 4, Forms and CGI, discusses forms in detail, and Chapter 7, Advanced Form Applications, shows examples of incorporating forms into several robust applications. Gateways Web gateways are programs or scripts used to access information that is not directly readable by the client. For example, say you have an Oracle database that contains baseball statistics for all the players on your company team and you would like to provide this information on the Web. How would you do it? You certainly cannot point your client to the database file (i.e., open the URL associated with the file) and expect to see any meaningful data. CGI provides a solution to the problem in the form of a gateway. You can use a language such as oraperl (see Chapter 9, Gateways, Databases, and Search/Index Utilities, for more information) or a DBI extension to Perl to form SQL queries to read the information contained within the database. Once you have the information, you can format and send it to the client. In this case, the CGI program serves as a gateway to the Oracle database, as shown in Figure 1.3. Figure 1.3: A gateway to a database [Graphic: Figure 1-3] Similarly, you can write gateway programs to any other Internet information service, including Archie, WAIS, and NNTP (Usenet News). Chapter 10, Gateways to Internet Information Servers, shows examples of interacting with other Internet services. In addition, you can amplify the power of gateways by using the forms interface to request a query or search string from the user to retrieve and display dynamic, or virtual, information. We will discuss these special documents next. Virtual Documents Virtual, or dynamic, document creation is at the heart of CGI. Virtual documents are created on the fly in response to a user's information request. You can create virtual HTML, plain text, image, and even audio documents. A simple example of a virtual document could be something as trivial as this: Welcome to Shishir's WWW Server! You are visiting from diamond.com. The load average on this machine is 1.25. Happy navigating! In this example, there are two pieces of dynamic information: the alphanumeric address (IP name) of the remote user and the load average on the serving machine. This is a very simple example, indeed! On the other hand, very complex virtual documents can be created by writing programs that use a combination of graphics libraries, gateways, and forms. As a more sophisticated example, say you are the manager of an art gallery that specializes in selling replicas of ancient Renaissance paintings and you are interested in presenting images of these masterpieces on the Web. You start out by creating a form that asks for user information for the purpose of promotional mailings, presents a search field for the user to enter the name of a painting, as well as a selection list containing popular paintings. Once the user submits the form to the server, a program can email the user information to a certain address, or store it in a file. And depending on the user's selection, either a message stating that the painting does not exist or an image of the painting can be displayed along with some historical information located elsewhere on the Internet. Along with the picture and history, another form with several image processing options to modify the brightness, contrast, and/or size of the picture can be displayed. You can write another CGI program to modify the image properties on the fly using certain graphics libraries, such as gd, sending the resultant picture to the client. This is an example of a more complex CGI program using many aspects of CGI programming. Several such examples will be presented in this book. What Is CGI? Some Working CGI Applications Chapter 1 The Common Gateway Interface (CGI) 1.3 Some Working CGI Applications What better way to learn about CGI than to see actual programs in action? Here are the locations of some of the more impressive CGI programs on the Web: ● Lycos World Wide Web Search Located at http://www.lycos.com, this server allows the user to search the Web for specific documents. Lycos returns a dynamic hypertext document containing the documents that match the user's search criteria. ● Coloring Book An entertaining application that displays an image for users to color. It can be accessed at http://www.ravenna.com/coloring. ● ArchiePlex Gateway A gateway to the Archie search server. Allows the user to search for a specific string and returns a virtual hypertext document. This useful gateway is located at http://pubweb.nexor.co.uk/public/archie/archieplex/archieplex.html. A simple Archie gateway is presented in Chapter 10, Gateways to Internet Information Servers. ● Guestbook with World Map A guestbook is a forms-based application that allows users to leave messages for everyone to see.
Recommended publications
  • PHP Game Programming
    PHP Game Programming Matt Rutledge © 2004 by Premier Press, a division of Course Technology. All rights SVP, Course Professional, Trade, reserved. No part of this book may be reproduced or transmitted in any Reference Group: form or by any means, electronic or mechanical, including photocopy- Andy Shafran ing, recording, or by any information storage or retrieval system with- Publisher: out written permission from Course PTR, except for the inclusion of Stacy L. Hiquet brief quotations in a review. Senior Marketing Manager: The Premier Press logo and related trade dress are trademarks of Premier Sarah O’Donnell Press and may not be used without written permission. Marketing Manager: Paint Shop Pro 8 is a registered trademark of Jasc Software. Heather Hurley PHP Coder is a trademark of phpIDE. Series Editor: All other trademarks are the property of their respective owners. André LaMothe Important: Course PTR cannot provide software support. Please contact Manager of Editorial Services: the appropriate software manufacturer’s technical support line or Web Heather Talbot site for assistance. Senior Acquisitions Editor: Course PTR and the author have attempted throughout this book to Emi Smith distinguish proprietary trademarks from descriptive terms by following Associate Marketing Manager: the capitalization style used by the manufacturer. Kristin Eisenzopf Information contained in this book has been obtained by Course PTR Project Editor and Copy Editor: from sources believed to be reliable. However, because of the possibility Dan Foster, Scribe Tribe of human or mechanical error by our sources, Course PTR, or others, the Publisher does not guarantee the accuracy, adequacy, or complete- Technical Reviewer: ness of any information and is not responsible for any errors or omis- John Freitas sions or the results obtained from use of such information.
    [Show full text]
  • Chapter 11 Web-Based Information Systems
    Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 [email protected] Chapter 11 Web-based Information Systems TP Application Architecture client n Front-end program n interacts with (possibly wide range of) display devices front-end n gathers and validates input, displays output n constructs and forward request (e.g., as a RPC Front-end or asynchronous message) Program è provides device-independence for server n Request controller server n guides the request execution Request Controller n determines required steps, then executes them by invoking transaction servers Transaction Transaction Transaction n usually runs as part of an ACID transaction ... Server Server Server n Transaction server n process that runs application programs doing the actual work of the request DBMS n almost always runs within the scope of an Database Database ACID transaction System System n typically interacts with a DBMS n simple applications can be composed into more complex ones (using local proc. call, TRPC, asynch. messaging, …) DB DB n makes difference to req. controller fuzzy Middleware for Heterogeneous and 2 © Prof.Dr.-Ing. Stefan Deßloch Distributed Information Systems Front-end Program Functions n Gather input and display output (user interaction) n form and menu concepts n user selects a menu item to identify the type of transaction to be executed n front-end program display a (series of) form(s) for gathering input data n input data is validated by the front-end program n goal: avoid calling
    [Show full text]
  • Features Enabled on Your Windows Host During Installation Snapcenter Software Soumik Das, Archana August 08, 2021
    Features enabled on your Windows host during installation SnapCenter Software Soumik Das, Archana August 08, 2021 This PDF was generated from https://docs.netapp.com/us- en/snapcenter/install/reference_features_enabled_on_your_windows_host_during_installation.html on September 16, 2021. Always check docs.netapp.com for the latest. Table of Contents Features enabled on your Windows host during installation . 1 Features enabled on your Windows host during installation The SnapCenter Server installer enables the Windows features and roles on your Windows host during installation. These might be of interest for troubleshooting and host system maintenance purposes. 1 Category Feature Web Server • Internet Information Services • World Wide Web Services • Common HTTP Features ◦ Default Document ◦ Directory Browsing ◦ HTTP Errors ◦ HTTP Redirection ◦ Static Content ◦ WebDAV Publishing • Health and Diagnostics ◦ Custom Logging ◦ HTTP Logging ◦ Logging Tools ◦ Request Monitor ◦ Tracing • Performance Features ◦ Static Content Compression • Security ◦ IP Security ◦ Basic Authentication ◦ Centralized SSL Certificate Support ◦ Client Certificate Mapping Authentication ◦ IIS Client Certificate Mapping Authentication ◦ IP and Domain Restrictions ◦ Request Filtering ◦ URL Authorization ◦ Windows Authentication • Application Development Features ◦ .NET Extensibility 4.5 ◦ Application Initialization ◦ ASP.NET 4.5 ◦ Server-Side Includes ◦ WebSocket Protocol • Management Tools ◦ IIS Management Console 2 Category Feature IIS Management Scripts and Tools • IIS Management Service • Web Management Tools .NET Framework 4.5.2 Features • .NET Framework 4.5.2 • ASP.NET 4.5.2 • Windows Communication Foundation (WCF) HTTP Activation45 ◦ TCP Activation ◦ HTTP Activation ◦ Message Queuing (MSMQ) activation Message Queuing • Message Queuing Services Ensure that no other applications uses the MSMQ service that SnapCenter creates and manages. • MSMQ Server Windows Process Activation Service • Process Model Configuration APIs All 3 Copyright Information Copyright © 2021 NetApp, Inc.
    [Show full text]
  • Lecture 28 Scripting Language Used to Create Dynamic Web Pages (Like Perl Open Source)
    PHP A server-side, cross-platform, HTML-embedded Lecture 28 scripting language used to create dynamic Web pages (like Perl open source). We can write PHP code directly into HTML and don’t PHP need to worry about CGI (like Java Server Pages). April 6, 2005 Looks like Perl and knowledge of one can help you understand the other. Web server needs to be configured to parse files with certain extensions (e.g. php or phtml) appropriately. PHP Serve-side Scripting Server-side scripting SSI: Server-side includes: Most CGI tools: very old scripting language write page headers, define layout, etc. mostly provides #include few really dynamic parts, most static PHP: have to write many static print statements complete language Let’s design pages by writing static HTML documents free with pieces of code inside: integrates nicely into Apache, IIS, other servers code is executed at request time pages can take parameters ASP: Active Server Pages Scripting languages come with libraries providing Microsoft version of PHP functions specially designed for Web programming: language is essentially Basic e.g.: URL/parameters manipulations, database gateways, ... JSP: Java Server Pages Java version PHP PHP Most popular third-party module for Apache: <html> code and extensive documentation available from <head><title>PHP Test</title></head> http://www.php.net/ <body><? print(“Hello World!”); ?></body> </html> Pieces of code are enclosed into <?...?> tags Example: <html> <html> <head><title>PHP Test</title></head> <head><title>PHP Test</title></head> <body>Hello World!</body> <body><? print(“Hello World!”); ?></body> </html> </html> 1 Parameter Decoding Parameter Decoding Each PHP script can be invoked as a CGI.
    [Show full text]
  • Vysoke´Ucˇenítechnicke´V Brneˇ Srovna´Níknihoven
    VYSOKE´ UCˇ ENI´ TECHNICKE´ V BRNEˇ BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMACˇ NI´CH TECHNOLOGII´ U´ STAV POCˇ ´ITACˇ OVE´ GRAFIKY A MULTIME´ DII´ FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF COMPUTER GRAPHICS AND MULTIMEDIA SROVNA´ NI´ KNIHOVEN PRO PRA´ CI S OBRAZEM COMPARISON OF IMAGE PROCESSING LIBRARIES BAKALA´ Rˇ SKA´ PRA´ CE BACHELOR’S THESIS AUTOR PRA´ CE LENKA KRU´ POVA´ AUTHOR VEDOUCI´ PRA´ CE Ing. DAVID BARˇ INA SUPERVISOR BRNO 2012 Abstrakt Tato bakala´rˇska´pra´ce se zaby´va´porovna´nı´m knihoven pracujı´cı´ch s obrazem. V pra´ci je mozˇne´ sezna´mit se s teoreticky´m u´vodem z oblasti zpracova´nı´obrazu. Pra´ce do hloubky rozebı´ra´knihovny OpenCV, GD, GIL, ImageMagick, GraphicsMagick, CImg, Imlib2. Zameˇrˇenı´popisu teˇchto kni- hoven se orientuje na rozhranı´v jazycı´ch C a C++. Za´veˇr pra´ce je veˇnova´n porovna´nı´z ru˚zny´ch hledisek. Abstract This bachelor thesis deals with comparison of image processing libraries. This document describes brief introduction into the field of image procesing. There are wide analysis of OpenCV, GD, GIL, ImageMagick, GraphicsMagick, CImg, Imlib2 libraries. The text aims at C and C++ language interfaces of these libraries. The end of the thesis is dedicated to comparison of libaries from various points. Klı´cˇova´slova Zpracova´nı´obrazu, OpenCV, GD, GIL, ImageMagick, GraphicsMagick, CImg, Imlib2 Keywords Image processing, OpenCV, GD, GIL, ImageMagick, GraphicsMagick, CImg, Imlib2 Citace Lenka Kru´pova´: Srovna´nı´knihoven pro pra´ci s obrazem, bakala´rˇska´pra´ce, Brno, FIT VUT v Brneˇ, 2012 Srovna´nı´knihoven pro pra´ci s obrazem Prohla´sˇenı´ Prehlasujem, zˇe som tu´to bakala´rsku pra´cu vypracovala samostatne pod vedenı´m pa´na Ing.
    [Show full text]
  • Cloud On-Premise Installation: IIS Settings Prerequisites
    Portal > Knowledgebase > Cloud > Cloud On-Premise installation: IIS Settings Prerequisites Cloud On-Premise installation: IIS Settings Prerequisites Scott Kircher - 2020-02-10 - in Cloud Certain settings should be configured in Internet Information Services (IIS) before installing the On-Premise version of AssetCloud or InventoryCloud. 1. This section is for Windows 10. Windows Server users, skip to Step 2. Enable the following features: Open the Programs and Features control panel, then click Windows Features at the left. You can enable most other features with no negative impact. Exception: DO NOT enable WebDAV Publishing. Screenshots are below. .NET Framework 3.5.x (expand and check all boxes) .NET Framework 4.6.2 (or higher) (expand and check all boxes) Internet Information Services, Web Management Tools, IIS Management Console Internet Information Services, World Wide Web Services, Application Development, .NET Extensibility 3.5.x Internet Information Services, World Wide Web Services, Application Development, .NET Extensibility 4.6.2 (or higher) Internet Information Services, World Wide Web Services, Application Development, ASP Internet Information Services, World Wide Web Services, Application Development, ASP.NET 3.5.x Internet Information Services, World Wide Web Services, Application Development, ASP.NET 4.6.2 (or higher) Internet Information Services, World Wide Web Services, Application Development, ISAPI Extensions Internet Information Services, World Wide Web Services, Application Development, ISAPI Filters Internet Information
    [Show full text]
  • CGI Programming on the World Wide Web
    CGI Programming on the World Wide Web CGI Programming on the World Wide Web By Shishir Gundavaram; ISBN: 1-56592-168-2, 433 pages. First Edition, March 1996. Table of Contents Preface Chapter 1: The Common Gateway Interface (CGI) Chapter 2: Input to the Common Gateway Interface Chapter 3: Output from the Common Gateway Interface Chapter 4: Forms and CGI Chapter 5: Server Side Includes Chapter 6: Hypermedia Documents Chapter 7: Advanced Form Applications Chapter 8: Multiple Form Interaction Chapter 9: Gateways, Databases, and Search/Index Utilities Chapter 10: Gateways to Internet Information Servers Chapter 11: Advanced and Creative CGI Applications Chapter 12: Debugging and Testing CGI Applications Appendix A: Perl CGI Programming FAQ Appendix B: Summary of Regular Expressions Appendix C: CGI Modules for Perl 5 Appendix D: CGI Lite Appendix E: Applications, Modules, Utilities, and Documentation Index Examples - Warning: this directory includes long filenames which may confuse some older operating systems (notably Windows 3.1). Search the text of CGI Programming on the World Wide Web. http://www.crypto.nc1uw1aoi420d85w1sos.de/documents/oreilly/web/cgi/ (1 of 2) [2/6/2001 11:48:37 PM] CGI Programming on the World Wide Web Copyright © 1996, 1997 O'Reilly & Associates. All Rights Reserved. http://www.crypto.nc1uw1aoi420d85w1sos.de/documents/oreilly/web/cgi/ (2 of 2) [2/6/2001 11:48:37 PM] Preface Preface Preface Contents: What's in the Book What You Are Expected to Know Before Reading Organization of This Book Conventions in This Book Acknowledgments The Common Gateway Interface (CGI) emerged as the first way to present dynamically generated information on the World Wide Web.
    [Show full text]
  • C Programming in Linux
    David Haskins C Programming in Linux 2 Download free eBooks at bookboon.com C Programming in Linux 2nd edition © 2013 David Haskins & bookboon.com ISBN 978-87-403-0543-2 3 Download free eBooks at bookboon.com C Programming in Linux Contents Contents About the author, David Haskins 7 Introduction 9 Setting up your System 12 1 Hello World 14 1.1 Hello Program 1 14 1.2 Hello Program 2 15 1.3 Hello Program 3 18 1.4 Hello Program 4 20 1.5 Hello World conclusion 23 2 Data and Memory 24 2.1 Simple data types? 24 2.2 What is a string? 28 �e Graduate Programme I joined MITAS because for Engineers and Geoscientists I wanted real responsibili� www.discovermitas.comMaersk.com/Mitas �e Graduate Programme I joined MITAS because for Engineers and Geoscientists I wanted real responsibili� Maersk.com/Mitas Month 16 I wwasas a construction Month 16 supervisorI wwasas in a construction the North Sea supervisor in advising and the North Sea Real work helpinghe foremen advising and IInternationalnternationaal opportunities ��reeree wworkoro placements solves Real work problems helpinghe foremen IInternationalnternationaal opportunities ��reeree wworkoro placements solves problems 4 Click on the ad to read more Download free eBooks at bookboon.com C Programming in Linux Contents 2.3 What can a string “mean” 29 2.4 Parsing a string 32 2.5 Data and Memory – conclusion 34 3 Functions, pointers and structures 36 3.1 Functions 36 3.2 Library Functions 38 3.3 A short library function reference 39 3.4 Data Structures 41 3.5 Functions, pointers and structures – conclusion
    [Show full text]
  • C Server Pages: an Architecture for Dynamic Web Content Generation
    C Server Pages: An Architecture for Dynamic Web Content Generation John Millaway Phillip Conrad Dept. of Computer and Information Sciences Dept. of Computer and Information Sciences Temple University Temple University 1805 N. Broad St. 1805 N. Broad St. Philadelphia, PA 19122 Philadelphia, PA 19122 [email protected] [email protected] ABSTRACT curs heavyweight process creation overhead. Approaches that in- This paper introduces C Server Pages (CSP), a highly efficient ar- volve simple template substitution by the web server itself based on chitecture for the creation and implementation of dynamic web so called server-side includes (SSIs) are lightweight, but not very pages. The CSP scripting language allows dynamic web contents to powerful. Application servers such as ColdFusion [3] introduce a be expressed using a combination of C code and HTML. A novel heavyweight run time layer. Interpreted languages such as Java, feature of CSP is that the C portions of the CSP source file are PHP, and Perl are typically slower than compiled languages such compiled into dynamic load libraries that become part of the run- as C. New languages specifically designed for the generation of ning web server, thus avoiding both the overhead of interpreted lan- server side content present an additional learning curve for already guages such as Perl, Java and PHP, as well as the need to create a overburdened developers [8]. separate process. We present an overview of the architecture and This paper introduces an alternative architecture called C Server implementation, and provide results of performance benchmarks Pages (CSP), based on combining languages familiar to many de- showing that CSP outperforms similar mainstream technologies, velopers: HTML, and C.
    [Show full text]
  • NIST SP 800-28 Version 2 Guidelines on Active Content and Mobile
    Special Publication 800-28 Version 2 (Draft) Guidelines on Active Content and Mobile Code Recommendations of the National Institute of Standards and Technology Wayne A. Jansen Theodore Winograd Karen Scarfone NIST Special Publication 800-28 Guidelines on Active Content and Mobile Version 2 Code (Draft) Recommendations of the National Institute of Standards and Technology Wayne A. Jansen Theodore Winograd Karen Scarfone C O M P U T E R S E C U R I T Y Computer Security Division Information Technology Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899-8930 March 2008 U.S. Department of Commerce Carlos M. Gutierrez, Secretary National Institute of Standards and Technology James M. Turner, Acting Director GUIDELINES ON ACTIVE CONTENT AND MOBILE CODE Reports on Computer Systems Technology The Information Technology Laboratory (ITL) at the National Institute of Standards and Technology (NIST) promotes the U.S. economy and public welfare by providing technical leadership for the nation’s measurement and standards infrastructure. ITL develops tests, test methods, reference data, proof of concept implementations, and technical analysis to advance the development and productive use of information technology. ITL’s responsibilities include the development of technical, physical, administrative, and management standards and guidelines for the cost-effective security and privacy of sensitive unclassified information in Federal computer systems. This Special Publication 800-series reports on ITL’s research, guidance, and outreach efforts in computer security and its collaborative activities with industry, government, and academic organizations. National Institute of Standards and Technology Special Publication 800-28 Version 2 Natl. Inst. Stand. Technol. Spec. Publ.
    [Show full text]
  • Apache Web Server Complete Guide
    Apache Web Server Complete Guide Dedoimedo www.dedoimedo.com www.dedoimedo.com all rights reserved Contents 1 Introduction 15 2 Basic Setup 16 2.1 Verify installation......................... 16 2.2 Package files............................ 16 2.3 Main configuration file(s)..................... 18 2.3.1 Backup........................... 18 2.4 Edit the httpd.conf configuration file............... 18 2.4.1 ServerRoot......................... 19 2.4.2 PidFile........................... 20 2.4.3 ServerName........................ 20 2.4.4 Add site to /etc/hosts file................. 21 2.4.5 DocumentRoot....................... 24 2.4.6 ErrorLog.......................... 25 2.4.7 Listen........................... 26 2.5 Create your HTML documents.................. 27 2.6 Start the Web Server....................... 29 2.7 Access the web site........................ 32 2.7.1 Local access........................ 32 2.7.2 Internal & external access................. 34 2.8 Summary of basic setup...................... 37 3 Advanced setup 38 3.1 Directory tags........................... 38 3.1.1 Order (allow, deny).................... 40 3.1.2 Indexes........................... 43 2 www.dedoimedo.com all rights reserved 3.1.3 DirectoryMatch...................... 46 3.2 Files tags.............................. 46 3.3 Location tags............................ 48 3.4 Directory, Files and Location................... 49 3.5 Redirect.............................. 50 3.6 Virtual Hosts............................ 50 3.6.1 Single IP, two websites................... 53 3.6.2 Two IPs, two websites................... 57 3.6.3 Other scenarios...................... 60 3.7 Modules.............................. 63 3.7.1 Module types........................ 63 3.7.2 View installed modules................... 64 3.7.3 LoadModule........................ 65 4 .htaccess 69 4.1 Create .htaccess file........................ 71 4.2 Create .htpasswd file........................ 71 4.3 Copy .htaccess to restricted directory..............
    [Show full text]
  • Constructs & Concepts
    Constructs & Concepts Language Design for Flexibility and Reliability Anya Helene Bagge moduleCppSkinhiddenscontext-freestart-symbolsProgramimportsDeclarationsexportssortsTmplClauseClassClausecontext-freesyntaxTmplClauseDecl->Decl cons("TmplDecl") "template""<" TypeParam"," *">"RequiresClause*->TmplClause cons("Template") "requires"Identifier"<" ConceptArgument"," *">"->RequiresClause cons("Requires") "template""<" TypeParam"," *">""type"Identifier->TypeParam cons("TemplateType") ExprDeclarativeSubClause*" ""return"Expr";"" "->Decl cons("DefDecl") "typename"Type->TypePar am prefer,cons("TypeParam") "class"Type->TypeParam prefer,cons("TypeParam") "class"TypeNameTypeParamList?->ClassClause cons("ClassClause") ClassClause->DeclDeclarativemoduleDeclarationsimportsLiteralsConceptsStatementsDataRepresenta{ } { } { tionexp} ortssortsStatDeclarativeExprDeclarativeDec{ } lDeclarativeSubClausecon{ text-freesyntaxSta} tDeclarati{ veSubClau} se*BlockStat->Decl cons("DefDecl"{ ) ExprDeclarativeSubClaus} e*"="Expr";"->Decl cons("DefDecl"){ TypeDeclarativeSub} { Clause*"="}DataRep->Decl cons("DefDec l"){ DeclDeclarativeSubClause*"} "Decl*" "->Decl cons("DefDecl"){ StatDeclarativeSubClause*";"->Decl} cons("NoDefDecl") ExprDeclarativeSubClause*";"->Decl{ } cons("NoDefDecl") TypeDeclarativeSubClause*";"->Decl cons("NoDefDecl") DeclDeclarativeSubClause*";"->Decl cons("NoDefDecl") sortsProcClauseProcNamecontext-freesyntax"procedure"ProcNameProcedureParamList->ProcClause{ cons("ProcClaus} e") ProcClause->StatDeclarativeIdentifier->ProcName"{ = "->ProcName}
    [Show full text]