ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <john@rmts.donpac.ru>
To: community@altlinux.ru
Subject: Re: [Comm] php as cgi
Date: Mon, 31 May 2004 21:30:45 +0400
Message-ID: <40BB6BC5.2090906@rmts.donpac.ru> (raw)
In-Reply-To: <20040531162712.18024fbd@phantom.intranet.atk>

Klimchev Konstantin пишет:

>>Action appication/x-httpd-php /bin/php-cgi
> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> это не опечатка (я про /bin/php-cgi)?

нет, так надо :)

> suexec -V ?

# suexec -V
  -D DOC_ROOT="/home"
  -D GID_MID=100
  -D HTTPD_USER="apache"
  -D LOG_EXEC="/var/log/httpd/suexec_log"
  -D SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
  -D UID_MID=100
  -D USERDIR_SUFFIX="public_html"

Правильно ли я понимаю, что это означает, что:

1. Папки пользователей должны лежать только в /home
2. Содержимое виртуальных хостов должно лежать в /home/user/public_html

?

Создаю следующую структуру:

# ls -l | grep web3
drwxrwx---    3 web3     web3           80 May 31 20:13 web3
# ls -l web3/
total 1
drwxrwx---    2 web3     web3          112 May 31 20:14 public_html
# ls -l web3/public_html/
total 8
-rw-rw----    1 web3     web3          191 May 31 20:14 index.html
-rw-rw----    1 web3     web3           17 May 31 20:08 index.php

Описываю виртуальный хост:

<VirtualHost 192.168.1.1>
   User web3
   Group web3
   ServerName web3.athlon.home
   DocumentRoot /home/web3/public_html
</VirtualHost>

Перезапускаю Apache и пытаюсь обратиться к http://web3.athlon.home, 
получаю 500 Internal Server Error, а в логах:

# cat /var/log/httpd/access_log
192.168.1.1 - - [31/May/2004:20:57:29 +0400] "GET /index.php HTTP/1.1" 
500 629
# cat /var/log/httpd/error_log
[Mon May 31 20:57:29 2004] [error] [client 192.168.1.1] Premature end of 
script headers: /home/bin/php-cgi
# cat /var/log/httpd/suexec_log
[2004-05-31 20:57:29]: info: (target/actual) uid: (web3/web3) gid: 
(web3/web3) cmd: php-cgi
[2004-05-31 20:57:29]: error: target uid/gid (1002/1002) mismatch with 
directory (0/0) or program (0/0)

> ЗЫ. Я порекомендую посмотреть на suphp (suphp.org) - сейчас усилено тестирую. Как раз для запуска php-cgi-скриптов от пользователя. 

Как-то пару месяцев назад я с Вами это уже обсуждал в сизифовской 
рассылке, то я так и не уяснил для себя (в том числе и из документации 
на suphp.org): чем в принципе suphp лучше? Только заточкой под php? А 
что там может быть заточено? Это же всего лишь средство запуска внешнего 
бинарника. Какие тут у php особенности?

> Я бы еще порекомендовал патчи на suexec (http://www.localhost.nl/patches/, http://phil.kodezone.com/opensource/patches/), но автор на них "положил" и рекомендует suphp.

спасибо, погляжу. Так забил он на свои патчи или он же автор suexec и на 
него положил тоже? Это меняет дело ;)

Вы suphp в пакет случайно не заворачивали?

-- 
С уважением, Прокопьев Евгений



  parent reply	other threads:[~2004-05-31 17:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-30 16:44 Eugene Prokopiev
2004-05-31 12:27 ` Klimchev Konstantin
2004-05-31 12:31   ` Klimchev Konstantin
2004-05-31 17:30   ` Eugene Prokopiev [this message]
2004-06-01  4:31     ` Klimchev Konstantin
2004-06-01  7:09       ` Eugene Prokopiev
2004-06-01  7:40         ` Klimchev Konstantin
2004-06-01 17:23           ` Eugene Prokopiev
2004-06-01 18:14             ` Eugene Prokopiev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40BB6BC5.2090906@rmts.donpac.ru \
    --to=john@rmts.donpac.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git