LING 408/508: Programming for Linguists Lecture 16 October 26 th.

Slides:



Advertisements
Similar presentations
20-753: Fundamentals of Web Programming 1 Lecture 11: Web Server Case Study Fundamentals of Web Programming Lecture 11: Web Server Case Study.
Advertisements

Initial web server configuration 1WUCM1. Overview Planning Testing the OS/Environment – IP setup Installation Configuration – Simple minimum details Testing.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Apache Configuration Setting up a web server. Basic Server Facts Runs on port 80 Server application -> httpd Richly configurable Many defaults will let.
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.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
LING 408/508: Programming for Linguists Lecture 16 October 16 th.
Installing Apache There are several ways to install the Apache web server – in CIT 370, you probably installed it from the CentOS CD-ROM although in fact,
CGI programming Using Apache. Concepts Browser prepares parameter list List is attached to name of program to run on server "submit" button sends string.
E-Commerce The technical side. LAMP Linux Linux Apache Apache MySQL MySQL PHP PHP All Open Source and free packages. Can be installed and run on most.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
A crash course in njit’s Afs
Linux Operations and Administration
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Raspberry Pi Training Truman College Goals of our Training Today Unbox and boot up the Raspberry Pi (RPi) Learn how to access the desktop graphical.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 10 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
The Linux Operating System Lecture 5: Apache Tonga Institute of Higher Education.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 10: Basic Apache Configuration and Management Chapter 26: Apache (httpd): Setting Up a Web.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
LING 408/508: Programming for Linguists Lecture 17 October 21 st.
The Network Management Lab pc pc pc pc pc Virtual Servers Your Laptop.
Web Servers Installation and Configuration May 24, 2001 CIS System Administration Problem Statement The class topic is setting up a Linux server to support.
Unix Command Project Justin Rogers for LS 560 Spring 2015.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
An introduction to Apache. Different Types of Web Servers Apache is the default web server for may Unix servers. IIS is Microsoft’s default web server.
Sponsored by the National Science Foundation Configuration Management For Experimenters: Ansible Hands-On Sarah Edwards, GPO.
1 John Magee 9 November 2012 CS120 Lecture 17a: Publishing Web pages.
CGI programming Using Apache. Concepts Browser prepares parameter list List is attached to name of program to run on server "submit" button sends string.
LING 408/508: Programming for Linguists Lecture 3 August 31 st.
HTML Hyper Text Markup Language A simple introduction.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
1 Week 6 The lynx browser Apache Web Server John Wang With materials courtesy of Inge Mclaurin.
Web Access Chain of Events CPTE 212 John Beckett.
Web Programming Brian Toone 8/27/2014. Outline for today 1.Understanding the architecture of the web 2.Overview of programming languages – Client-side.
LinuxChix Apache. Serving Webpages The layer 7 protocol (HTTP) is what our browsers talk to get us the websites we can't seem to live without. HTTP is.
LING 408/508: Programming for Linguists Lecture 17 October 28 th.
WAMP Windows Apache MySQL and PHP i.e. “WAMP”. Why WAMP? WampServer is a Windows web development environment. It allows you to create and test web pages.
LING 408/508: Programming for Linguists Lecture 18 November 2 nd.
LING 408/508: Programming for Linguists Lecture 26 December 7 th.
LING 408/508: Programming for Linguists Lecture 15 October 21 th.
LING/C SC/PSYC 438/538 Lecture 11 Sandiway Fong. Administrivia Homework 5 graded.
More than one site? Use multiple configuration files Use multiple configuration files  httpd –d {path}  Assumes “conf/httpd.conf” Logging transactions.
LING/C SC/PSYC 438/538 Lecture 9 Sandiway Fong. Adminstrivia Homework 4 graded Homework 5 out today – Due Saturday night by midnight – (Gives me Sunday.
Planning, configuring, running and maintaining a web server -1.
Web Technology – Web Server Setup : Chris Uriarte WMB-520: Web Technology Web Server Setup Meeting 2: Apache Installation and Initial Configuration Rutgers.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Multi-Domain Hosting CPTE 212 “Missing Slides” for 1/22/2015 John Beckett.
WordPress and Etherpad with BlueMix and Docker. Our aim is to run on BlueMix containers (now in beta) these two famous services In the BlueMix dashboard,
Apache Web Server v. 2.2 Reference Manual Chapter 2 Starting Apache.
9/21/04 James Gallagher Server Installation and Testing: Hands-on ● Install the CGI server with the HDF and FreeForm handlers ● Link data so the server.
L.A.M.P. İlker Korkmaz & Kaya Oğuz CS 350. Why cover a lecture on LAMP? ● Job Opportunities – There are many hosting companies offering LAMP as a web.
Version Control Systems
COP 4343 Unix System Administration
Redirection Allow requests to be moved about your file system or around the web ScriptAlias Allows you to run CGI scripts Simple to use.
Unix System Administration
Unix System Administration
Version Control Systems
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
LING 408/508: Computational Techniques for Linguists
LING 408/508: Computational Techniques for Linguists
LING/C SC 581: Advanced Computational Linguistics
Presentation transcript:

LING 408/508: Programming for Linguists Lecture 16 October 26 th

Adminstrivia Homework 6 graded Homework 7 out today – if possible do it by next time – if not, next Saturday by midnight

Today's Topics regexper.com Homework 6 Review

regexper.com (recommended by Gus Hahn-Powell)

regexper.com Visualize regular expressions as an automaton:

Homework 6 review From UIUC POS Tagger demo: sample.txt Helicopters will patrol the temporary no-fly zone around New Jersey's MetLife Stadium Sunday, with F-16s based in Atlantic City ready to be scrambled if an unauthorized aircraft does enter the restricted airspace. Down below, bomb-sniffing dogs will patrol the trains and buses that are expected to take approximately 30,000 of the 80,000-plus spectators to Sunday's Super Bowl between the Denver Broncos and Seattle Seahawks. The Transportation Security Administration said it has added about two dozen dogs to monitor passengers coming in and out of the airport around the Super Bowl. On Saturday, TSA agents demonstrated how the dogs can sniff out many different types of explosives. Once they do, they're trained to sit rather than attack, so as not to raise suspicion or create a panic. TSA spokeswoman Lisa Farbstein said the dogs undergo 12 weeks of training, which costs about $200,000, factoring in food, vehicles and salaries for trainers. Dogs have been used in cargo areas for some time, but have just been introduced recently in passenger areas at Newark and JFK airports. JFK has one dog and Newark has a handful, Farbstein said.

Homework 6 review Question 1: write a regex that finds all the acronyms in the article.

Homework 6 review Question 2: write a regex that finds all and only the numeric items in the article.

Homework 6 review Question 3: write a regex that finds all Noun- Noun compounds

Homework 6 review Question 4: write a regex that finds all the main verbs (exclude auxiliaries) in the article. (will|to|does) ([a-z]+)|([a-z]+ed|said|has)\b

Homework 6 review Question 5: write a regex that finds all the passive verbs

The server side So far, all the web programming has been client-side only – i.e. the Javascript code is running on the browser Let's build a webserver – the client-side will send form information to the server-side to be processed

Building a Webserver We'll use cgi-bin and bash scripts initially … Apache2 is the most common webserver software – unfortunately, configuration are different on OSX and Ubuntu (we will cover both here)

Common Gateway Interface (CGI) The glue between a webserver and programs that run on the computer (= server) hosting the webserver 1.Normally, a webserver sends out static webpages in response to (URL) requests from a client (your web browser). 2.Sometimes, we want the request to run a program (a script or binary) on the server that does some computation and generates some result to be displayed on the client (as a webpage). generated.html client server: webserver Today's class

Apache Webserver on OSX Commands to be entered at a Terminal Apache version (OSX El Capitan): –httpd –v(/usr/sbin/httpd) –Server version: Apache/ (Unix) –Server built: Aug :51:57 Apache webserver control: –sudo apachectl start(/usr/sbin/apachectl) –sudo apachectl stop –sudo apachectl –k restart (after configuration change) –apachectl configtest (check configuration) –Syntax OK –ps -ax | grep httpd –15709 ?? 0:00.09 /usr/sbin/httpd -D FOREGROUND –15713 ?? 0:00.00 /usr/sbin/httpd -D FOREGROUND –15715 ttys000 0:00.00 grep httpd –sudo apachectl stop –ps -ax | grep httpd –15723 ttys000 0:00.00 grep httpd Apache 2.4

Apache Webserver on OSX sudo apachectl start On a browser, enter: not running…

Apache Webserver on OSX Default static webpage storage location: – –/Library/WebServer/Documents/index.html – Let's create index.html ourselves! –sudo nano /Library/Webserver/Documents/index.html (nano is a simple text editor ^ means use the Control key)

Apache Webserver on OSX Default static webpage storage location: – –/Library/WebServer/Documents/index.html – Let's create index.html ourselves! –sudo nano /Library/Webserver/Documents/index.html

Apache Webserver on OSX Configuration file: –/etc/apache2/httpd.conf

Apache Webserver on OSX Static webpages storage locations: – need to be superuser) –mkdir ~sandiway/Sites ( /Users/username/Sites ) –index.html –sudo nano /etc/apache2/users/sandiway.conf create this file …

Apache Webserver on OSX Static webpages storage locations: – –sudo nano /etc/apache2/httpd.conf uncomment mod_userdir.so line (remove the #)

Apache Webserver on OSX Static webpages storage locations: – –sudo nano /etc/apache2/httpd.conf uncomment httpd_userdir.conf line (remove the #)

Apache Webserver on OSX Static webpages storage locations: – –sudo nano /etc/apache2/extra/httpd-userdir.conf uncomment this include (remove the #)

Apache Webserver on OSX Static webpages storage locations: – –sudo apachectl –k restart – create a file ~sandiway/Sites/index.html

Apache Webserver on OSX Static webpages storage locations: –

Apache Webserver on OSX /var/log/apache2/access_log

Homework 7 For Mac owners – set up Apache2 on your mac – – – Create two different index.html webpages at these locations – Show your system works! – Consult the web if things don't work… – php-and-phpmyadmin-working-on-osx el-capitan/

Homework 7 For Ubuntu owners – set up Apache2 in VirtualBox (see following slides) – – – Create two different index.html webpages at these locations – Show your system works!

Apache Webserver on Ubuntu Ubuntu: –sudo apt-get update –sudo apt-get install apache2

Apache Webserver on Ubuntu Ubuntu: –sudo apt-get install apache2

Apache2 on Ubuntu Apache webserver: –sudo apache2ctl start ( /usr/sbin/apache2ctl ) –sudo apache2ctl stop –sudo apache2ctl restart not running…

Apache2 on Ubuntu Apache webserver: –sudo apache2ctl start ( /usr/sbin/apache2ctl ) by default it should be running… DocumentRoot /var/www/html /var/www/html/index.html

Apache2 on Ubuntu ps aux | grep apache2 (looks for apache2 processes) apache2ctl start (doesn't work, not superuser) sudo apache2ctl start (correct!)

Apache2 on Ubuntu sudo apache2ctl start (correct!) ps aux | grep apache2 (looks for apache2 processes)

Apache2 on Ubuntu Master configuration file: –/etc/apache2/httpd.conf

Apache2 on Ubuntu cd /etc/apache2/ grep –r "DocumentRoot". /etc/apache2/sites-enabled/000-default.conf

Apache2 on Ubuntu /etc/apache2/sites-enabled/000-default.conf

Apache2 on Ubuntu Logs are in directory: /var/log/apache2/ –access.log –error.log

Apache2 on Ubuntu User web files in ~/public_html

Apache2 on Ubuntu To enable user web files in ~/public_html –sudo a2enmod userdir –apache2ctl –k restart –