2022-01-29 22:46:41 +01:00
|
|
|
%
|
2022-06-24 03:19:32 +02:00
|
|
|
% Chapitre un peu en vrac :)
|
2022-01-29 22:46:41 +01:00
|
|
|
%
|
|
|
|
\chapter{Web servers}
|
|
|
|
|
|
|
|
% ==============================================================
|
2022-06-24 03:19:32 +02:00
|
|
|
\section{Apache, Nginx} \index{Apache} ìndex{nginx}
|
|
|
|
|
|
|
|
Apache (\textsl{A patchy server} et Nginx sont de grands classiques,
|
|
|
|
voire même, dans le cas d'Apache, un grand ancien.
|
2022-01-29 22:46:41 +01:00
|
|
|
|
2022-06-24 03:19:32 +02:00
|
|
|
Que nous ne verrons pas pour le moment. Je vais plutôt me concentrer
|
|
|
|
sur un autre serveur : \texttt{lighthttp}, pour passer ensuite à quelque
|
|
|
|
chose d'encore plus bas-niveau.
|
2022-01-29 22:46:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
% ==============================================================
|
|
|
|
\section{Lighttpd} \index{Lighttpd}
|
|
|
|
|
|
|
|
Un outsider ?
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
root@ramen:~# lighty-enable-mod userdir
|
|
|
|
Enabling userdir: ok
|
|
|
|
Run "service lighttpd force-reload" to enable changes
|
|
|
|
root@ramen:~# service lighttpd force-reload
|
|
|
|
root@ramen:~#
|
|
|
|
\end{verbatim}
|
|
|
|
|
2022-04-03 11:56:49 +02:00
|
|
|
\textbf{Q:} Sur une installation fraiche, la racine du site est
|
2022-06-24 03:19:32 +02:00
|
|
|
en erreur 403\index{403} ?\linebreak
|
2022-04-03 11:56:49 +02:00
|
|
|
\textbf{R:} Par défaut le listing des répertoires vides
|
|
|
|
(sans \texttt{index.html}) est interdit. Pour changer ça, il faut
|
|
|
|
\texttt{\# lighttpd-enable-mod dir-listing} et
|
|
|
|
\texttt{\# service lighttpd force-reload}, voilà.
|
|
|
|
|
2022-10-05 06:08:23 +02:00
|
|
|
Question : comment forcer le \texttt{Content-Type} pour un type particulier
|
|
|
|
de fichier ? Par exemple text/plain pour les fichiers \texttt{.POV} ?
|
|
|
|
|
2022-06-24 03:19:32 +02:00
|
|
|
|
2022-01-29 22:46:41 +01:00
|
|
|
% ==============================================================
|
|
|
|
|
|
|
|
\section{Custom made}
|
|
|
|
|
2022-06-24 03:19:32 +02:00
|
|
|
|
2022-01-29 22:46:41 +01:00
|
|
|
\begin{verbatim}
|
|
|
|
tth@ramen:~/Houba/Fractales90$ apt show libmicrohttpd12
|
|
|
|
Package: libmicrohttpd12
|
|
|
|
Version: 0.9.72-2
|
|
|
|
Priority: optional
|
|
|
|
Section: libs
|
|
|
|
Source: libmicrohttpd
|
|
|
|
Maintainer: Daniel Baumann <daniel.baumann@progress-linux.org>
|
|
|
|
Installed-Size: 211 kB
|
|
|
|
Depends: libc6 (>= 2.17), libgnutls30 (>= 3.7.0)
|
|
|
|
Homepage: https://www.gnu.org/software/libmicrohttpd/
|
|
|
|
Tag: role::shared-lib
|
|
|
|
Download-Size: 109 kB
|
|
|
|
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 Packages
|
|
|
|
Description: library embedding HTTP server functionality
|
|
|
|
GNU libmicrohttpd is a small C library that is supposed to make it
|
|
|
|
easy to run an HTTP server as part of another application.
|
|
|
|
Key features that distinguish GNU Libmicrohttpd from other
|
|
|
|
projects are:
|
|
|
|
* C library: fast and small
|
|
|
|
* API is simple, expressive and fully reentrant
|
|
|
|
* Implementation is HTTP 1.1 compliant
|
|
|
|
* HTTP server can listen on multiple ports
|
|
|
|
* Four different threading models (select, poll, pthread, thread pool)
|
|
|
|
* Support for IPv6
|
|
|
|
* Support for SHOUTcast
|
|
|
|
* Support for incremental processing of POST data (optional)
|
|
|
|
* Support for basic and digest authentication (optional)
|
|
|
|
* Support for SSL3 and TLS
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
|
|
|
|
% ==============================================================
|
|
|
|
|