Services Web Webmail Proxy

27
Master on Free Software Systems Integration on Free Software Enrique Ocaña González (Block III)

Transcript of Services Web Webmail Proxy

Page 1: Services Web Webmail Proxy

Master on Free Software

Systems Integration on Free Software

Enrique Ocaña González

(Block III)

Page 2: Services Web Webmail Proxy

Master on Free Software

Index (1/3)

● Web Server: Apache– Introduction– Install– Configuration

Page 3: Services Web Webmail Proxy

Master on Free Software

Index (2/3)

● Webmail: Squirrelmail– Introduction– Install– Configuration

Page 4: Services Web Webmail Proxy

Master on Free Software

Index (3/3)

● Web proxy: Squid– Introduction– Install– Configuration

Page 5: Services Web Webmail Proxy

Master on Free Software

Web server: Apache

Page 6: Services Web Webmail Proxy

Master on Free Software

Index

● Web Server: Apache– Introduction– Install– Configuration

Page 7: Services Web Webmail Proxy

Master on Free Software

Introduction

● Multi-Processing Modules (MPMs)– event, prefork, worker, itk– winnt, netware, os2...

● Dynamic Shared Objects (DSOs), APXS– Cgi– Server side scripting languages:

● perl, php, python, tcl...

– Virtual hosts, direct/reverse proxy, URL rewriting...

Page 8: Services Web Webmail Proxy

Master on Free Software

Install

● Packages: apache2 apache2-mpm-prefork apache2.2-common

Page 9: Services Web Webmail Proxy

Master on Free Software

Configuration

● Configuration: /etc/apache2– apache2.conf– httpd.conf (user configuration)

● Modules: a2enmod a2dismod● Sites: sites-available, sites-enabled

Page 10: Services Web Webmail Proxy

Master on Free Software

Configuration

● Global environment– Config root: ServerRoot /etc/apache– Performance: Timeout, Keepalive,

MaxKeepAliveRequests, KeepaliveTimeout, MinSpareServers, MaxSpareServers, StartServers, MaxClient, MaxRequestsPerChild

– Listen ports (ports.conf): Listen ip:port, BindAddress host

– <IfModule>: Parses config only if selected module has been loaded

Page 11: Services Web Webmail Proxy

Master on Free Software

Configuration

● Virtual hosts (sites-available/-enabled)– Where to listen for VHosts: NameVirtualHost– Vhost definition: <VirtualHost>

● Virtual host options– ServerName, ServerAlias– ServerAdmin– DocumentRoot

Page 12: Services Web Webmail Proxy

Master on Free Software

Configuration

● Virtual host directory options– <Directory>, <DirectoryMatch>– <Files>, <FilesMatch>– <Location>, <LocationMatch>– <Options>

● ExecCGI, FollowSymLinks, Indexes, SymlinksIfOwnerMatch...

– Allow/Deny from ip/host/mask(*), Order

Page 13: Services Web Webmail Proxy

Master on Free Software

Configuration

● Virtual host directory options– Unix process user: User, Group – Access control: AccessFileName .htaccess– UseCanonicalName– Default data types: DefaultType text/plain– Resolve hostnames to log: HostNameLookups – Log levels and files: ErrorLog, LogLevel,

LogFormat, CustomLog, ForensicLog

Page 14: Services Web Webmail Proxy

Master on Free Software

Configuration

● Virtual host directory options– Server version: ServerSignature,

ServerTokens – Aliases: Alias, ScriptAlias– Icons, descriptions and headers

● AddIconByEncoding, AddIconByType, AddIcon, DefaultIcon, AddDescription, ReadmeName, HeaderName, IndexIgnore

Page 15: Services Web Webmail Proxy

Master on Free Software

Configuration

● Virtual host directory options– Mime types and i18n: AddLanguage,

AddCharset, LanguagePriority, AddType, AddHandler

– Meta info: MetaDir, MetaSuffix– Personal error messages: ErrorDocument

Page 16: Services Web Webmail Proxy

Master on Free Software

Configuration

● Htaccess files for authentication– Basic (plain text password)

● Create pass/group filehtpasswd ­c /etc/apache2/mypass username

● Configure authenticationAuthType Basic

AuthName “By Invitation Only”

AuthUserFile /etc/apache2/mypassAuthGroupFile /etc/apache2/mygroup

Require group authors

Page 17: Services Web Webmail Proxy

Master on Free Software

Configuration

● Htaccess files for authentication– Digest (MD5 sum of the password)

● Create pass/group filehtdigest ­c /etc/apache2/mypass “By Invitation Only” username

● Configure authenticationAuthType Digest

AuthName “By Invitation Only”

AuthDigestFile /etc/apache2/mydigAuthDigestGroupFile /etc/apache2/mydiggroup

Require user john peter

Page 18: Services Web Webmail Proxy

Master on Free Software

Web mail: Squirrelmail

Page 19: Services Web Webmail Proxy

Master on Free Software

Index

● Webmail: Squirrelmail– Introduction– Install– Configuration

Page 20: Services Web Webmail Proxy

Master on Free Software

Introduction

● Features– Written in PHP, Lightweight– No dependencies (eg: DB), No JavaScript– MIME support– IMAP Folder manipulation– Address book– Themeable– Wide range of plugins

Page 21: Services Web Webmail Proxy

Master on Free Software

Install

● Packages: squirrelmail● Post-installation:

– /usr/sbin/squirrelmail-configure– Create symlink to enable virtual host:

● /etc/apache2/conf.d/squirrelmail.conf /etc/squirrelmail/apache.conf

Page 22: Services Web Webmail Proxy

Master on Free Software

Configuration

● Example: gmail as IMAP serverSquirrelMail Configuration : Read: config.php (1.4.0)­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­Server Settings

General­­­­­­­1.  Domain                 : gmail.com2.  Invert Time            : false3.  Sendmail or SMTP       : SMTP

IMAP Settings­­­­­­­­­­­­­­4.  IMAP Server            : imap.gmail.com5.  IMAP Port              : 9936.  Authentication type    : login7.  Secure IMAP (TLS)      : true8.  Server software        : other9.  Delimiter              : detect

B.  Update SMTP Settings   : localhost:25H.  Hide IMAP Server Settings

Page 23: Services Web Webmail Proxy

Master on Free Software

Web proxy: Squid

Page 24: Services Web Webmail Proxy

Master on Free Software

Index

● Web proxy: Squid– Introduction– Install– Configuration

Page 25: Services Web Webmail Proxy

Master on Free Software

Introduction

● Features:– Web caching proxy (http, https, ftp)– High performance– Multiplatform (Unix, NT)– Flexible Access Control List (ACL) rules– Interoperable:

● Content/antivirus filters (dansguardian, squidguard, addzaper)

● Internet Cache Protocol (ICP)

Page 26: Services Web Webmail Proxy

Master on Free Software

Installation

● Packages: squid (squid-common)

Page 27: Services Web Webmail Proxy

Master on Free Software

Configuration

● /etc/squid/squid.conf