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!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Elo, znowu problem :(.
Od paru dni proboje skonfigurowac apache2 z obsluga skryptow cgi, z opisu zamieszczonego w dziale :artykuly. Moj problem polega na tym, ze kiedy proboje odpalic testowy skrypt, to mimo iz wszelkie uprawnienia zarowno do katalogu ze stronami www jak i do samego skryptu sa ustawione poprawnie, serwer zwraca odpowiedz:
Forbidden You don't have permission to access /~tomek/cgi-bin/test.pl on this server.
Moze nie mam odpalonej obslugi cgi ? Jak to sprawdzic?
Przy kompilacji apache2 podalem:
./configure --prefix=/usr/local/apache2 --enable-so --enable-modules=rewrite --enable-shared=rewrite --enable-ssl --enable-rewrite --enable-cgi
Moj httpd.conf wyglada nastepujaco:
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/www/" <Directory /> Options FollowSymLinks AllowOverride FileInfo </Directory> <Directory "/home/www"> Options Indexes FollowSymLinks AllowOverride FileInfo Order allow,deny Allow from all </Directory> # katalogi uzytkownikow UserDir www <Directory /home/*/www> AllowOverride None Options +SymLinksIfOwnerMatch +IncludesNOEXEC Options -ExecCGI -Indexes 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.htm 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> ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" </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 /home/www/localhost 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 /home/www/localhost 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 LoadModule php5_module modules/libphp5.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 Order allow,deny Allow from all AllowOverride AuthConfig Limit </Directory>
C.
Offline
Time (s) | Query |
---|---|
0.00011 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00117 | 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='3.144.31.64' WHERE u.id=1 |
0.00072 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.144.31.64', 1732283779) |
0.00041 | SELECT * FROM punbb_online WHERE logged<1732283479 |
0.00064 | DELETE FROM punbb_online WHERE ident='124.243.176.193' |
0.00190 | DELETE FROM punbb_online WHERE ident='18.217.118.7' |
0.00598 | DELETE FROM punbb_online WHERE ident='18.222.113.135' |
0.00116 | DELETE FROM punbb_online WHERE ident='185.191.171.14' |
0.00107 | DELETE FROM punbb_online WHERE ident='3.138.175.166' |
0.00033 | 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=7019 AND t.moved_to IS NULL |
0.00335 | SELECT search_for, replace_with FROM punbb_censoring |
0.00115 | 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=7019 ORDER BY p.id LIMIT 0,25 |
0.00195 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=7019 |
Total query time: 0.01998 s |