Lighttpd
eBook - ePub

Lighttpd

  1. 236 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Lighttpd

About this book

In Detail

Lighttpd is a secure, flexible, and most importantly, light web server designed and optimized for high performance environments. It is open-source and licensed under the revised BSD license. Its event-driven architecture optimized for a large number of parallel connections, its advanced features (FastCGI, CGI, Auth, Output Compression, URL Rewriting, and many more), and its small memory footprint compared to other web servers, make Lighttpd the perfect server software for every web server that suffers load problems or for serving static media separately from dynamic content.

Lighttpd supports the FastCGI, SCGI, and CGI interfaces to external programs, permitting web applications written in any programming language to be used with this server. Excellent performance for PHP, a particularly popular language, has received special attention. Additionally, Lighttpd has become popular within the Ruby on Rails community.

This is your fast guide to getting started and getting inside the Lighttpd web server. Written from a developer's perspective, this book helps you understand Lighttpd, and get it set up as securely and quickly as possible.

Who this book is for

This book is for System Administrators or Web Developers seeking a lean deployment platform for web applications or who want to switch to a "lighter" web server than Apache.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Lighttpd

Andre Bogus


Table of Contents

Lighttpd
Credits
About the Author
About the Reviewer
Preface
What This Book Covers
What You Need For this Book
Who is This Book For
Conventions
Reader Feedback
Customer Support
Downloading the Example Code for the Book
Errata
Piracy
Questions
1. Introduction to Lighttpd
Installing Lighttpd
Building Lighttpd using Autotools
Building Lighttpd using CMake
Summary
2. Configuring and Running Lighttpd
Starting Lighttpd by Hand
Other Core Options
Mime Types
Selectors
Excursion: Regular Expressions
Play it Again, Sam
Are You There?
Decisions, Decisions
Group and Capture
Lucky Escape
Rewriting and Redirecting Requests
Including Variables, Files, and Shell-code
Summary
3. More Virtual Hosting and CGI
Extended Virtual Hosting
MySQL based Virtual Hosting
Installing MySQL
Bringing MySQL and mod_mysqlvhost Together
Going Dynamic
CGI with mod_cgi
FastCGI
SCGI
mod_proxy_core and backends
Summary
4. Downloads and Streams
Core Settings
Traffic Shaping
Showing Directory Contents
Securing Downloads
Streaming Content
Putting it All Together
Summary
5. Big Brother Lighttpd
Privacy
O Browser, Where Art Thou?
Access Logging
Tracking Users
Other Data Points
Summary
6. Encryption: SSL
Self-Signed Keys
Being our own Certificate Authority
Obtaining a Key Pair from a Third-Party Supplier
Configuring Lighttpd to use SSL
Summary
7. Securing Lighttpd
Barriers to Entry
Evading Denial of Service Attacks
Setting up Logrotate
Know Your Foe
RRDtool
Grepping the Logs
Summary
8. Containing Lighttpd
Giving up Privileges
Changing Root
Separating the Backend
Summary
9. Optimizing Lighttpd
Installing http_load
Running http_load Tests
Specific Optimizations
Example: Caching with mod_magnet
Measuring System Load
Profiling with gprof
Load Testing our Profiling Build
Summary
10. Migration from Apache
Adding Lighttpd to the Mix
Excursion: mod_proxy
Reducing Apache Load
mod_perl, mod_php, and mod_python
.htaccess
.htaccess and PHP
Rewriting Rules
WebDAV
Summary
11. CGI Revisited
Ruby on Rails
WordPress
phpMyAdmin
MediaWiki
Trac
AWStats
AjaxTerm
Summary
12. Using Lua with Lighttpd
Lua: A small Primer
Useful Lua Libraries
Lua/FastCGI
Installing Lua/FastCGI
GET and POST Requests
Looking at the Cache
Running mod_magnet
Example: A Shoutbox
Summary
13. Writing Lighttpd Modules
Handling Configuration
Rewriting the Request
Manipulating the Response
Summary
A. HTTP Status Codes
B. Module/Configuration Index
Internal
mod_access
mod_accesslog
mod_alias
mod_auth
mod_cgi
mod_cml
mod_chunked
mod_compress
mod_deflate
mod_dirlisting
mod_evasive
mod_evhost
mod_expire
mod_fastcgi
mod_flv_streaming
mod_indexfile
mod_magnet
mod_proxy
mod_proxy_core
mod_redirect
mod_rewrite
mod_rrdtool
mod_scgi
mod_secure_download
mod_setenv
mod_simple_vhost
mod_sql_vhost_core, mod_mysql_vhost
mod_ssi
mod_staticfile
mod_status
mod_trigger_b4_dl
mod_uploadprogress
mod_userdir
mod_usertrack
mod_webdav
Index

Lighttpd

Copyright © 2008 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2008
Production Reference: 1151008
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-847192-10-3
www.packtpub.com
Cover Image by Vinayak Chittar ()

Credits

Author
Andre Bogus
Reviewer
Peter Lavetsky
Development Editor
Swapna V. Verlekar
Technical Editors
Dhiraj Chandiramani
Rasika Sathe
Editorial Team Leader
Akshara Aware
Project Manager
Abhijeet Deobhakta
Project Coordinator
Abhijeet Deobhakta
Indexer
Monica Ajmera
Proofreader
Claire Lane
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade

About the Author

Andre Bogus is a musician turned programmer. He has worked in different jobs from voice acting to programming to teaching to managing software projects. At the moment he works as a consultant and implementer for KOGIT GmbH, an Identity Management company based in Germany.
He found Lightt...

Table of contents

  1. Lighttpd

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Lighttpd by Andre Bogus in PDF and/or ePUB format, as well as other popular books in Computer Science & Information Technology. We have over one million books available in our catalogue for you to explore.