[Débutant] Problème de lenteur et de redirection d'URL
Bonjour,
Après de multiples recherches infractueuses sur comment remédier à mes deux problèmes, je constate que je dois avoir du mal à lire et à interpréter ce que je lis...
Bref, complètement novice dans les serveurs Web, j'ai installé récemment une Debian Lenny en tant que passerelle/routeur de mon réseau local. Puis j'ai installé un proxy http (Squid) et enfin SquidGuard pour mettre quelques règles d'autorisations. Et voici pourquoi Apache2 intervient.
Mon premier problème est l'extrème lenteur. En effet, si je fais sur mon pc hôte http://localhost/ (message "It works!") ou http://localhost/cgi-bin/squidGuard.cgi, au moins 3 minutes s'écoulent avant l'affichage de la page.
Comment remédier à cela?
Mon second problème est une utilsation basique de SquidGuard où l'on refuse des IPs locales à se connecter au Web et en retour on affiche une page Web d'erreur fourni par le serveur Apache.
Evidemment mon pc local ne recoit pas la page d'erreur désirée et affiche:
Citation:
The requested URL could not be retrieved
While trying to retrieve the URL:
http://127.0.0.1/cgi-bin/squidGuard.cgi?
The following error was encountered:
* Connection to 127.0.0.1 Failed
The system returned:
(110) Connection timed out
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster.
Generated Thu, 05 Mar 2009 09:23:53 GMT by localhost (squid/3.0.STABLE8)
Voici le contenu du fichier SquidGuard.conf:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| src admin {
ip 192.168.1.100
}
acl {
admin {
pass any
}
default {
pass none
redirect <a href="http://127.0.0.1/cgi-bin/squidGuard.cgi?clientaddr=%a+clientname=%n+clientident=%i+srcclass=%s+targetclass=%t+url=%u" target="_blank">http://127.0.0.1/cgi-bin/squidGuard....lass=%t+url=%u</a>
}
} |
Une petite partie du fichier apache2.conf:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
# prefork MPM
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
...
Listen 80 |
D'ailleurs comment vérifier que les modules worker/prefork MPM sont bien chargés?
Et enfin le fichier /etc/apache2/sites-available/default:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost> |
J'espère que vous pourrez m'aider à avancer.
NB: Voici le tuto que qu iexplique la démarche à suivre -> http://irp.nain-t.net/doku.php/220squid:060_squidguard