Apache HTTP Server from 10,000 feet An open source Apache feature overview and discussion.

Slides:



Advertisements
Similar presentations
Dan Fleck.  WAMP – Windows Apache MySQL PHP -  LAMP – Linux Apache MySQL PHP ◦ There are.
Advertisements

20-753: Fundamentals of Web Programming 1 Lecture 11: Web Server Case Study Fundamentals of Web Programming Lecture 11: Web Server Case Study.
Apache Web Server Quick and Dirty Steve Gibbard for SANOG 16 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Configuring a Web Server. Overview  Understand how a Web server works  Install IIS (Internet Information Services) and Apache Web servers  Examine.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
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.
IST346:  Web Services. Today’s Agenda  Learn the basics of how the Web works  Understand various web service architectures  Address scaling, security,
SquirrelMail for Webmail AfNOG 2012 Scalable Internet Services (SS-E) Presented by Michuki Mwangi Serrekunda, Gambia (Original Materials by Joelja)
APACHE SERVER By Innovationframes.com »
Fronting Tomcat with Apache Httpd Mladen Turk Red Hat, Inc.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Apache Security with SSL Using FreeBSD SANOG VI IP Services Workshop July 18, 2005 Hervey Allen Network Startup Resource Center.
Nikto LUCA ALEXANDRA ADELA. Nikto  Web server assessment tool  Written by Chris Solo and David Lodge  Released on December 27, 2001  Stable release:
Linux Operations and Administration
Course 201 – Administration, Content Inspection and SSL VPN
Basics of the HTTP Protocol and Apache Web Server Brandon Checketts.
Deploying Ruby on Rails How to make your application actually serve Dan Buettner 18 Oct 2007.
Module 10: Designing an AD RMS Infrastructure in Windows Server 2008.
Module 13: Configuring Availability of Network Resources and Content.
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.
Implementing ISA Server Publishing. Introduction What Are Web Publishing Rules? ISA Server uses Web publishing rules to make Web sites on protected networks.
Copyright 2000 eMation SECURITY - Controlling Data Access with
A Guide to Secure Web Services with GJXML Hey I downloade d an IEPD! Cool, how do you write a web service? I use.NET Moo! I use Java.
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
1 Apache and Virtual Sites and SSL Dorcas Muthoni.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
TELE 301 Lecture 10: Scheduled … 1 Overview Last Lecture –Post installation This Lecture –Scheduled tasks and log management Next Lecture –DNS –Readings:
Module 11: Implementing ISA Server 2004 Enterprise Edition.
Apache Web Server. Aim of this section –Introduce you to workings of the most common webserver –Give you a little experience in role of webmaster Configuring.
Apache Security Travis Jeffries. Introduction Authentication and Authorization Strict Access Methods Defending against Attacks Bad CGI Programs Apache.
The mod_proxy_balancer Cookbook A module overview with practical solutions to common problems Daniel Ruggeri.
Apache Web Server Quick and Dirty for AfNOG 2015 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Apache Web Server Administration Syed Iqbal Syed Iqbal.
Cosc 4750 Configuring httpd, Mysql, And Samba. defaults By default httpd demean will startup and work User directories are turned off Default directory.
Apache Web Server Quick and Dirty Evelyn NAMARA for AfNOG 2014 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Apache Web Server Quick and Dirty Ayitey Bulley for AfNOG 2011 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Integrating and Troubleshooting Citrix Access Gateway.
1 Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG X Cairo, Egypt May 2009 Hervey Allen.
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
Apache Web Server Quick and Dirty Kevin G. Chege for AfNOG 2013 (Originally by Joel Jaeggli for AfNOG 2007) ‏
Advanced Sendmail Part 1
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Web Server Administration Chapter 6 Configuring a Web Server.
Presented by Lonnye Bower Fardin Khan Chris Orona APACHE WEB SERVER.
Web Server Apache PHP HTTP Request User types URL into browser Address resolved if nec. We use directly Most browsers request.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 10: Internet Information Services (IIS)
IBM Http Server Basic Administration. CONTENTS Web server IHS How does IHS differ from Apache Basic configurations Advanced Configurations Performance.
Web Server Security: Protecting Your Pages NOAA OAR WebShop 2001 August 2 nd, 2001 Jeremy Warren.
IS 4506 Windows NTFS and IIS Security Features.  Overview Windows NTFS Server security Internet Information Server security features Securing communication.
Speeding Up Alfresco and Share using Nginx Reverse/Caching Frontend Proxy Ishara Fernando Senior Linux Systems Administrator.
Secure Authentication A Brief Overview PacNOG 6 Workshop Nadi, Fiji Hervey Allen.
Web Server Administration Chapter 6 Configuring a Web Server.
Apache Configuration. Application Install IBM HTTP Server is Apache.
Open Science Grid Configuring RSV OSG Resource & Service Validation Thomas Wang Grid Operations Center (OSG-GOC) Indiana University.
APACHE Apache is generally recognized as the world's most popular Web server (HTTP server). Originally designed for Unix servers, the Apache Web server.
ALL THINGS IIS TERRI DONAHUE
Presented by Michael Rainey South Mississippi Linux Users Group
NAT、DHCP、Firewall、FTP、Proxy
Managing State Chapter 13.
Apache web server Quick overview.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess
Unix System Administration
Unix System Administration
(Originally by Joel Jaeggli for AfNOG 2007)‏
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
IIS.
APACHE WEB SERVER.
Presentation transcript:

Apache HTTP Server from 10,000 feet An open source Apache feature overview and discussion

About the Presenter

About Apache HTTP Server Founded 1995 – built on NCSA httpd project Open Sourced 1999 – version 1.3 Version – add threading, compression, and openssl support Version load balancing, authorization improvements Version event mpm, memory optimization

The very basics Have a problem? Look at the Apache doc: Download the newest version YES! It works on linux and windows Keep everything but docroot together in a custom directory, unless you’re really used to where Linux stores things Start and stop with apachectl (easy) or httpd commands (more flexible & more than 1 apache install) Choose a worker – Prefork (No threads, think php / perl), MPM (threaded), Event (Lots of simple traffic / keep alive) Modules extend Apache and can be dynamically loaded – no need to compile them with Apache

Basic Configuration Have your httpd.conf contain only what modules you need to start up. Generally avoid and know what you’re loading Use additional conf files for additional features, and include them at end of httpd.conf: include conf/enabled*.conf. Files load in alpha numeric – I use enabledX00_feature.conf Limit server information to world with ServerSignature Off ServerTokens Prod

See what’s happening with mod_status

Understand what’s happing with logs LogFormat ("%h %l %u %t \"%r\“) (%>s) (%b) (\"%{Referer}i\“) (\"%{User-Agent}i\“) (%D) (%^FB) (%I) (%O) combined-with-IO LogFormat (Date/Time) (request status) (total bytes) (how we got here) (browser) (total request time) (First Byte time) (Incoming bytes) (Outgoing Bytes) Error logging, most verbose to least: traceX, debug, info, notice, warn, error, crit, alert, emerg

Virtual Hosting Allows Apache to run multiple domain names and / or listen on 80 and 443 Preferred way to use SSL – SSL always requires a dedicated IP address, easily assigned in virtual host Can generally configure each virtual host separate from master httpd.conf and other virtual hosts. Useful for log names and locations for example. Modules inherited from other configuration files

Directing Traffic Control traffic to downstream servers, such as application servers Use mod_proxy (proxyPass) for simple traffic Use mod_rewrite (rewriteRule) for hybrid traffic control, URI changes, and HTTP to HTTPS translation. Use mod_proxy_balance for high availability traffic control.

Basic Security Control Allow / deny access in configurations with Require (all / domain / IP) (granted / denied).htaccess allows granular control of access and configuration by directory, but is also very slow. Ideal for distributed / multiple user / user administrator situations Multiple forms of authentication (user/pass) available, but not generally secure. Secure via application if possible and encrypt traffic with ssl.

Certificates with openssl Use newest version of Openssl – see Heartbleed, BEAST, FREAK, Poodle…. ….. Self Sign certificates for testing and personal use Certs composed of csr (certificate signing request), key (private SSL key),.cer(certificate) Scan your site for free for vulnerabilities and compatibility with Qualys sslabs

Its ALIVE! (and keeping it that way) High availability downstream with mod_proxy_balance d/mod_proxy_balancer.html d/mod_proxy_balancer.html Keep it sticky with sticky sessions Simple active / passive Apache with keepalived with VRRP Simple setup sample: ed-Simple-IP-failover-on-Ubuntu.html ed-Simple-IP-failover-on-Ubuntu.html

Appendix 1 - SSL generation script #!/usr/bin/perl -w die "usage: autogenSSLcert.pl [certname] [open ssl ver] [sslPasskey]\n" unless ($ARGV[0] && $ARGV[1] && $ARGV[2]); $certname = $ARGV[0]; $sslVer = $ARGV[1]; $sslPasskey = $ARGV[2]; $country="US"; $state="Maryland"; city="Silver Spring"; $org="Your Organization here"; $unit="Your subsidary / branch / etc here“ ; print "Generating key for $certname\n"; system "/software/openssl/$sslVer/bin/openssl genrsa -out $certname.key 2048"; print "Generating key for $certname\n"; $cmdFileParams = "|/product/openssl/$sslVer/bin/openssl req -new -key $certname.key -out $certname.csr"; open(SSLGEN, "$cmdFileParams"); print SSLGEN "$country\n"; print SSLGEN "$state\n"; print SSLGEN "$city\n"; print SSLGEN "$org\n"; print SSLGEN "$unit\n"; print SSLGEN "$certname\n"; print SSLGEN print SSLGEN "$sslPasskey\n"; print SSLGEN ".\n"; close (SSLGEN); print "creating self-signed cert for $certname\n"; system "/software/openssl/$sslVer/bin/openssl x509 -req -days in $certname.csr -signkey $certname.key -out $certname.cer";

Appendix 2 – Listing of config files enabled100dont_log.conf - things I don't log, like monitoring requests enabled200perf.conf - performance items, like mod_deflate enabled300status.conf - status page configuration enabled400custom_pages.conf - custom pages for 40X and 50X enabled500cgi.conf - CGI configuration to serve perl enabled600ssl.conf - SSL base configuration and modules Enabled800cluster.conf – High Availability Clustering Configurations enabled901domain1_http.conf - domain1 HTTP enabled901domain1_ssl.conf - domain1 Ssl enabled902domain2_http.conf - domain2 HTTP enabled902domain2_ssl.conf - domain2 SSL enabled903domain1_http.conf - domain3 HTTP httpd.conf – base configuration Magic - last resort file to help look at file and determine type mime.types – describes file type

Appendix 3 – Common rewrites # Turn On the RewriteEngine and Inherit all globally set rewrite rules RewriteEngine on RewriteOptions Inherit # Only allow REQUEST_METHOD GET and POST, deny all others RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|DELETE|SEARCH|COPY|MOVE|PROPFIND|PROPPATCH|MKCOL|LOCK |UNLOCK|OPTIONS) RewriteRule.* - [F] # Ensure that a request is encrypted, unless…. RewriteCond %{SERVER_PORT} !443 RewriteCond %{REQUEST_URI} !/static RewriteCond %{REMOTE_ADDR} !10. RewriteRule ^(.*)$ [L,R] # Proxy requests, unless they are images or css RewriteCond %{REQUEST_URI} ^/application(.*) RewriteRule !(\.gif$|\.jpg$|\.css$) [P]