|
132.
|
|
|
Squid is configured by editing the directives contained within the <filename>/etc/squid/squid.conf</filename> configuration file. The following examples illustrate some of the directives which may be modified to affect the behavior of the Squid server. For more in-depth configuration of Squid, see the References section.
|
|
|
|
Squid se configure en modifiant les directives contenues dans le fichier <filename>/etc/squid/squid.conf</filename>. Les exemples suivants illustrent certaines modifications de directives qui peuvent affecter le comportement du serveur Squid. Pour une configuration plus avancée de Squid, voyez la section références.
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:869(para)
|
|
133.
|
|
|
Prior to editing the configuration file, you should make a copy of the original file and protect it from writing so you will have the original settings as a reference, and to re-use as necessary. Make this copy and protect it from writing using the following commands:
|
|
|
|
Avant de modifier le fichier de configuration, vous devriez faire une copie du fichier original et le protéger en écriture, vous aurez alors les paramètres par défaut en référence à utiliser si besoin. Faites cette copie et protégez la de l'écriture en utilisant la commande suivante[nbsp] :
|
|
Translated by
Philip Millan
|
|
Reviewed by
Pierre Slamich
|
|
|
|
Located in
serverguide/C/web-servers.xml:875(para)
|
|
134.
|
|
|
sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original
|
|
|
|
sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:881(command)
|
|
135.
|
|
|
sudo chmod a-w /etc/squid/squid.conf.original
|
|
|
|
sudo chmod a-w /etc/squid/squid.conf.original
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:882(command)
|
|
136.
|
|
|
To set your Squid server to listen on TCP port 8888 instead of the default TCP port 3128, change the http_port directive as such:
|
|
|
|
Pour que votre serveur Squid écoute sur le port TCP 8888 à la place du port par défaut 3128, modifiez la directive http_port comme ceci[nbsp] :
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:889(para)
|
|
137.
|
|
|
http_port 8888
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
http_port 8888
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:893(programlisting)
|
|
138.
|
|
|
Change the visible_hostname directive in order to give the Squid server a specific hostname. This hostname does not necessarily need to be the computer's hostname. In this example it is set to <emphasis>weezie</emphasis>
|
|
|
|
Pour donner un nom d'hôte spécifique à votre serveur Squid, changez la directive visible_hostname. Ce nom d'hôte n'a pas forcément besoin d'être le même que le nom d'hôte de la machine. Dans cet exemple il est défini comme étant <emphasis>weezie</emphasis>.
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:898(para)
|
|
139.
|
|
|
visible_hostname weezie
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
visible_hostname weezie
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:902(programlisting)
|
|
140.
|
|
|
Using Squid's access control, you may configure use of Internet services proxied by Squid to be available only users with certain Internet Protocol (IP) addresses. For example, we will illustrate access by users of the 192.168.42.0/24 subnetwork only:
|
|
|
|
En utilisant le contrôle d'accès de Squid, vous pouvez configurer l'accès aux services Internet gérés par le proxy Squid de telle sorte qu'ils ne soient disponibles que pour les utilisateurs ayant certaines adresses IP. À titre d'exemple, nous allons détailler le cas d'un accès uniquement aux utilisateurs du sous-réseau 192.168.42.0/24[nbsp] :
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:907(para)
|
|
141.
|
|
|
Add the following to the <emphasis role="bold">bottom</emphasis> of the ACL section of your <filename>/etc/squid/squid.conf</filename> file:
|
|
|
|
Ajoutez ce qui suit en <emphasis role="bold">bas</emphasis> de la section ACL de votre fichier <filename>/etc/squid/squid.conf</filename>[nbsp] :
|
|
Translated by
Emmanuel Sunyer
|
|
|
|
Located in
serverguide/C/web-servers.xml:912(para) serverguide/C/web-servers.xml:932(para)
|