Unix System Administration

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Enabling Secure Internet Access with ISA Server
PHP syntax basics. Personal Home Page This is a Hypertext processor It works on the server side It demands a Web-server to be installed.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
DT211/3 Internet Application Development Active Server Pages & IIS Web server.
Server-Side vs. Client-Side Scripting Languages
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Hypertext Transport Protocol CS Dick Steflik.
The Web Server Every web site (the collection of html/css files, data files, scripts and other files) must be stored on a web server The term web server.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Web Client/Server Communication A290/A590, Fall /09/2014.
Chapter 6: Hostile Code Guide to Computer Network Security.
SquirrelMail for Webmail AfNOG 2012 Scalable Internet Services (SS-E) Presented by Michuki Mwangi Serrekunda, Gambia (Original Materials by Joelja)
SquirrelMail for Webmail AfNOG 2013 Scalable Internet Services (SS-E) Presented by Michuki Mwangi Lusaka, Zambia (Original Materials by Joelja)
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
Linux Operations and Administration
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
The Linux Operating System Lecture 5: Apache Tonga Institute of Higher Education.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
SIMPLE ROUTER The slide made by Salim Malakouti. Next we will create the Router  What do I we mean by a router?  Routers work similar to a map. It receives.
CSN09101 Networked Services Week 8: Essential Apache Module Leader: Dr Gordon Russell Lecturers: G. Russell, J. Jackson.
FTP (File Transfer Protocol) & Telnet
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Let’s Wub Wub tutorial What is Wub? HTTP 1.1 Webserver Written by Colin McCormack 100% Tcl Web application framework Domain based.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
TPR5: Custom Configurations Steve Lewis, Web Manager, SUNY Brockport TPR5: Custom Configurations: Unlock the Power of Apache Steven Lewis Web Manager SUNY.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
1 Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG X Cairo, Egypt May 2009 Hervey Allen.
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.
HOW THE WEB WORKS Reference: Learning Web Design (4 th edition) by Robbins 2012 – Chapter 2 (pp. 21 – 32)
Apache HTTP Server from 10,000 feet An open source Apache feature overview and discussion.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 10: Internet Information Services (IIS)
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Building Your Own Website Using:. Install & configure LAMP. Download WordPress and run it as a local website on your Raspberry Pi. Configure WordPress.
Web Server Administration Chapter 6 Configuring a Web 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.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Web and Proxy Server.
Web Technology Seminar
Tiny http client and server
Introduction to Dynamic Web Programming
ITM352 PHP and Dynamic Web Pages: Server Side Processing 1.
Apache web server Quick overview.
WWW and HTTP King Fahd University of Petroleum & Minerals
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess
Unix System Administration
Web Development Web Servers.
SquirrelMail for Webmail
Unix System Administration
Hypertext Transport Protocol
Unix System Administration
Introduction to Programming the WWW I
Getting web pages First we need to get the webpage by issuing a HTTP request. The best option for this is the requests library that comes with Anaconda:
SharePoint-Hosted Apps and JavaScript
IIS.
Configuring Internet-related services
LING 408/508: Computational Techniques for Linguists
PHP and Forms.

PHP: Hypertext Preprocessor
Web Application Development Using PHP
Presentation transcript:

Unix System Administration Chris Schenk Lecture 17 – Tuesday Mar 11 CSCI 4113, Spring 2008

Apache Aliases Allows modification of the default web directory Can make subsets of URLs point to different places on the local filesystem Alias /ftp /var/ftp <Directory /var/ftp> Order deny,allow Deny from all Allow from 128.138.202.8 </Directory> Remember to set permissions on the aliased directory (on the filesystem!)

Apache Rewrites Requires a special module to be installed Use a2enmod to enable modules You'll use this command for both ssl and rewrites Use regular expressions for matching Then specify new URL and return code Must enable rewrites with a directive RewriteEngine On (Maybe) match some conditions before rewrite: RewriteCond %{HTTP_HOST} "^cs\.colorado\.edu" [NC] Rewrite a URL: RewriteRule "^(.*)$" "http://www.cs.colorado.edu$1" [L,R]

Apache Documentation Always useful (but can be cryptic) mod_ssl http://httpd.apache.org/docs/2.0/mod/mod_ssl.html mod_rewrite http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html General Apache config http://httpd.apache.org/docs/2.0/mod/directives.html

Apache Logs Under /var/log/apache2 Access and error logs exist here “access.log” for all standard queries “error.log” for all errors (4xx, 5xx) Different log format than standard logs IP addresses, date, and query Return code (200 OK, 404 not found, etc) User agent (browser type and version) This is how browser-specific pages are served up

Proxies Content management and filtering for layer 4 Very similar to firewalls for layer 2,3 filtering Filtering done based on headers only It's illegal to look at content of data without consent! Federal level felony, equivalent to opening someone else's mail Usually used as gateways in a company for web access Prevent people from wasting time! There can be interesting ways around this though

Open Proxies Badness! You get calls from the FBI... Gamedev.cs.colorado.edu Apache config: ProxyRequests on Allows webserver to handle remote requests Proxy scans occur constantly on webservers Used as a means to hide origination machine Gamedev machine used to download websites amazon.com, interscience.wiley.com, sciencedirect.com, springerlink.com

Finding Open Proxies Simply query webserver for URL not hosted GET http://www.scanproxy.com:80/px_judge.php?p=80 HTTP/1.0" 404 ... Notice the 404! This means file-not-found Which is what we expect since we aren't hosting that site If that said 200OK, we are an open proxy! And bad people start using us as such If you're going to run a proxy, use something like Squid Cache and lock it down carefully!

PHP PHP: PHP Hyptertext Processor Recursive name geeks at work C-like syntax, no types on variables Don't have to include anything for functions All functions are available by default Fantastic website with function lists and uses http://www.php.net/manual/en Yet another tool for a sysadmin Sometimes we gotta do some programming

PHP Invocation PHP is built for the web by default But can be used for command line scripts For web, libphp4.so or libphp5.so must be loaded in Apache .so (shared object) is equivalent to .dll (dynamic link library) under windows For command line, an interpreter exists /usr/bin/php Works similar to /bin/bash for interpreting scripts #!/usr/bin/php -q

PHP Files By default, files are read as text For presentation to a browser as HTML Code must be included in special tags #!/usr/bin/php -q <?php print “Hello world\n”; ?> If tags don't exist, text is printed verbatim This is to allow easy typing of HTML without having to 'print' each and every line of HTML

PHP Syntax Again, C/C++ like syntax, without types Also you can get away without use of parenthesis sometimes Squiggly brackets *must* be used For if/for/while statements, even if they're one line if($bigSays == “Do work son.”) { doWork(); } Variables do NOT have to be defined before use $command = “dig cs.colorado.edu mx”;

PHP Examples They're friggin' everywhere And a lot of them are bad too No sense of good coding standards Lots of insecure code Lab06 has PHP examples in part 4 Take a look, but they aren't the best either I should know, I wrote 2/3 of them Writing secure code is important for us all Sysadmins have to worry about bad code running on systems, lots of exploits are out there