PDA

View Full Version : Apache2 Errore 403


Kebold
05-09-2007, 11:50
Salve,

Non so se sia la sezione giusta, nel caso non lo fosse perdonatemi e indirizzatemi su una più adatta.

Ho il mio bel web server linux (suse) su cui ho installato apache2.
Tutto funziona perfettamente, ma se su un mio sito, provo a fare dei refresh di pagina ripetuti mi compare l'errore 403 "accesso Negato".

Suppongo sia un problema di numero di connessioni (?).
Come posso risolvere tale problema?

Grazie

kingv
05-09-2007, 13:22
riporti access e error log di quando hai il messaggio di errore?

e' una macchina molto lenta e MaxClients è a un valore molto basso? sarebbe cmq difficile con un solo browser provocare il problema

Kebold
05-09-2007, 13:40
allora:

errorlog

[Wed Sep 05 14:37:24 2007] [error] [client 217.133.105.66] client denied by server configuration: /srv/www/cartella/www.miosito.it/

access log

217.133.105.66 - - [05/Sep/2007:14:40:08 +0200] "GET / HTTP/1.1" 200 20850 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:08 +0200] "GET / HTTP/1.1" 200 20839 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:08 +0200] "GET / HTTP/1.1" 200 20721 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:08 +0200] "GET / HTTP/1.1" 200 20954 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:08 +0200] "GET / HTTP/1.1" 200 20738 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:08 +0200] "GET / HTTP/1.1" 200 21018 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:09 +0200] "GET / HTTP/1.1" 403 1033 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:09 +0200] "GET /templates/fabio_theme/css/template_css.css HTTP/1.1" 304 - "http://www.miosito.it/" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"
217.133.105.66 - - [05/Sep/2007:14:40:10 +0200] "GET / HTTP/1.1" 403 1033 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; it; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"


No, non è una macchina lenta, assolutamente. (è un server hp proliant con processori xeon dual core a 2 gh e 4 gb di ram)

Il valore MaxClient è impostato a 250

kingv
05-09-2007, 17:23
puoi postare la sezione in cui definisci il vhost per www.miosito.it?
sembra un problema di permessi di accesso, ma non si spiega perchè ogni tanto funziona e ogni tanto no.

Kebold
06-09-2007, 09:21
<VirtualHost indirizzo_ip>
DocumentRoot /srv/www/cartella/www.miosito.it/
ServerName www.miosito.it
ServerAdmin miaemail
# ErrorLog /var/log/apache2/www.miosito.it-error_log
# CustomLog var/log/apache2/www.miosito.it-access_log combined
ServerAlias miosito.it
# YaST created entry
<Directory "/srv/www/cartella/www.miosito.it">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Non riesco proprio a capire da cosa dipenda il problema...

Kebold
07-09-2007, 09:54
up :)

erysed
07-09-2007, 14:53
prova a controllare su che valore è impostato il parametro MaxRequestPerClient, o qualcosa del genere (purtroppo non ricordo il nome esatto), che regola esattamente il tetto massimo di richieste provenienti da uno stesso client da accettare contemporaneamente (MaxClient invece ti imposta il tetto massimo di client da servire contemporaneamente).

Kebold
10-09-2007, 10:49
<IfModule worker.c>
# initial number of server processes to start
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
StartServers 3
# minimum number of worker threads which are kept spare
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#minsparethreads
MinSpareThreads 25
# maximum number of worker threads which are kept spare
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxsparethreads
MaxSpareThreads 75
# upper limit on the configurable number of threads per child process
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadlimit
ThreadLimit 64
# maximum number of simultaneous client connections
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
MaxClients 400
# number of worker threads created by each child process
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild
ThreadsPerChild 25
# maximum number of requests a server process serves
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
MaxRequestsPerChild 10000
</IfModule>


:(