Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2007-03-16 20:54:05

  Conio - Użytkownik

Conio
Użytkownik
Skąd: Gorlice suckz!
Zarejestrowany: 2005-09-20

[apache2]: client denied by server configuration...

Elo,
po zainstalowaniu serwera apache2 z php4, skompilowalem i zainstalowalem php5, nastepnie wyedytowalem http.conf dodajac linijki:

Kod:

AddType application/x-httpd-php5 .php5
ScriptAlias /php/ "/usr/local/php5/bin/"
Action application/x-httpd-php5 "/php/php"

oraz wyedytowalem linijki DirectoryIndex.
Jednak gdy opalam skryp .php5, nie uruchamia sie, a w logu pojawia sie wpis:

Kod:

[Fri Mar 16 20:49:00 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/php5/bin/php, referer: http://box/~tomek/

Co to moze oznaczac?
C.

Offline

 

#2  2007-03-16 22:35:54

  czadman - Bicycle repairman

czadman
Bicycle repairman
Skąd: Wrocław
Zarejestrowany: 2005-07-08

Re: [apache2]: client denied by server configuration...

Spróbuj dodać dyrektywę

Allow from 127.0.0.1[/quote]


[url=http://www.debian.org/][img]http://www.debian.org/logos/openlogo-nd-50.png[/img][/url]

Offline

 

#3  2007-03-16 23:14:51

  Conio - Użytkownik

Conio
Użytkownik
Skąd: Gorlice suckz!
Zarejestrowany: 2005-09-20

Re: [apache2]: client denied by server configuration...

Nie pomoglo. Zalaczam moj httpd.conf:

Kod:

ServerRoot "/usr/local/apache2"

Listen 127.0.0.1:80
listen 127.0.0.1:443

<IfModule !mpm_netware_module>
User daemon
Group daemon
</IfModule>

Servername 127.0.0.1
ServerAdmin you@example.com

DocumentRoot "/home"
<Directory />
   Options FollowSymLinks
   AllowOverride FileInfo
   Allow from all
</Directory>

# katalogi uzytkownikow
UserDir www
<Directory /home/*/www>
   Options Indexes FollowSymLinks
   AllowOverride FileInfo
   Order allow,deny
   Allow from all
</Directory>

# mod_rewrite support
<IfModule mod_rewrite.c>
   RewriteEngine on 
   RewriteLog "/usr/local/apache2/logs/rewrite.log"
   RewriteLogLevel 9
</IfModule>

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/usr/local/apache2/htdocs">   
    Options Indexes FollowSymLinks    
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.xhtml index.php index.php4 index.php5 index.cgi index.pl
</IfModule>

AddDefaultCharset ISO-8859-2

<FilesMatch "^.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

ErrorLog logs/error_log

LogLevel warn

<IfModule log_config_module>

    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
    LogFormat "%h %l %u %t "%r" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
    </IfModule>


    CustomLog logs/access_log common

</IfModule>

<IfModule alias_module>
   
</IfModule>

<IfModule cgid_module>

</IfModule>

<Directory "/usr/local/apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module> 
    TypesConfig conf/mime.types    
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
</IfModule>


<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

NameVirtualHost 127.0.0.1:80
NameVirtualHost 127.0.0.1:443

# sekcja virtualhost - przykladowy nowy Vhost bez obslugi SSl

<VirtualHost 127.0.0.1:80>
ServerAdmin admin@space
DocumentRoot /usr/local/apache2
ServerName box
ErrorLog logs/localhost-error-log
CustomLog logs/localhost-access_log common
</VirtualHost>

# przykladowy nowy Vhost z obsluga SSl

<VirtualHost 127.0.0.1:443>
DocumentRoot /usr/local/apache2
ServerName 127.0.0.1:443
ServerAdmin root@space
ErrorLog logs/localhost-error-log
CustomLog logs/localhost-access_log common
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLcertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
SSLcertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
SetEnvIf User-Agent "." "MSIE." 
nokeepalive ssl-unclean-shutdown 
downgrade-1.0 force-respone-1.0
</VirtualHost>

# Ladowanie modulu php i obsluga parsowania ver4
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4


# Ladowanie modulu php i obsluga parsowania ver5
AddType application/x-httpd-php5 .php5
ScriptAlias /php/ "/usr/local/php5/bin/"
Action application/x-httpd-php5 "/php/php"

# Obsluga skryptow cgi
AddHandler cgi-script .cgi .pl

<Directory /home/*/www/cgi-bin">
Options +ExecCGI
</Directory>

C.

Offline

 

#4  2007-03-16 23:21:36

  czadman - Bicycle repairman

czadman
Bicycle repairman
Skąd: Wrocław
Zarejestrowany: 2005-07-08

Re: [apache2]: client denied by server configuration...

No przydałoby się jeszcze coś takiego:

Kod:

<Directory "/usr/local/php5/bin/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory> 

:)


[url=http://www.debian.org/][img]http://www.debian.org/logos/openlogo-nd-50.png[/img][/url]

Offline

 

#5  2007-03-16 23:41:19

  Conio - Użytkownik

Conio
Użytkownik
Skąd: Gorlice suckz!
Zarejestrowany: 2005-09-20

Re: [apache2]: client denied by server configuration...

Dodalem te linijki, i faktycznie cos sie ruszylo, niestety teraz jak odpalam skrypt testowy - to przegladarka pyta czy chce go zapisac na dysk.
Log:

Kod:

[Fri Mar 16 23:39:04 2007] [error] [client 127.0.0.1] Premature end of script headers: php, referer: http://box/~tomek/

C.

Offline

 

#6  2007-03-17 17:04:12

  Conio - Użytkownik

Conio
Użytkownik
Skąd: Gorlice suckz!
Zarejestrowany: 2005-09-20

Re: [apache2]: client denied by server configuration...

Problem tkwil w zlej konfiguracji php, prawdopodobnie musialem pominac jakas opcje przy ./configure, ale zrekompilowalem php5 i zadzialalo.

Dzienx za wszelka pomoc,
pzdr C.

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)

[ Generated in 0.013 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00010 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00132 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.190.160.6' WHERE u.id=1
0.00106 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.190.160.6', 1732286102)
0.00051 SELECT * FROM punbb_online WHERE logged<1732285802
0.00107 SELECT topic_id FROM punbb_posts WHERE id=55200
0.00177 SELECT id FROM punbb_posts WHERE topic_id=7232 ORDER BY posted
0.00146 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=7232 AND t.moved_to IS NULL
0.00005 SELECT search_for, replace_with FROM punbb_censoring
0.00127 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=7232 ORDER BY p.id LIMIT 0,25
0.00216 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=7232
Total query time: 0.01081 s