ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Eugene Prokopiev <john@rmts.donpac.ru>
To: community@altlinux.ru
Subject: [Comm] php as cgi
Date: Sun, 30 May 2004 20:44:01 +0400
Message-ID: <40BA0F51.5040104@rmts.donpac.ru> (raw)

Здравствуйте!

Необходима возможность выполнять php-скрипты на разных виртуальных 
хостах от имени соответствующих пользователей, для чего необходима 
возможность использования php в режиме cgi.

Сделал следующее:

1. Собрал php из ALM 2.2 не как cli, а как cgi
2. В конце /etc/httpd/conf/httpd.conf написал:

ScriptAlias /bin/ "/usr/bin/"
AddType appication/x-httpd-php .php
Action appication/x-httpd-php /bin/php-cgi

После рестарта Apache все заработало.

Переходим к виртуальным хостам. Если описание виртуального хоста 
выглядит так:

<VirtualHost 192.168.1.1>
   ServerName web1.athlon.home
   DocumentRoot /var/www/vhosts/web1/web
</VirtualHost>

все работает. А если так:

<VirtualHost 192.168.1.1>
   User web1
   Group web1
   ServerName web1.athlon.home
   DocumentRoot /var/www/vhosts/web1/web
</VirtualHost>

получаю 500 Internal Server Error, а в логах:

[Sun May 30 19:49:33 2004] [error] [client 192.168.1.1] Premature end of 
script headers: /usr/bin/php-cgi

Пользователь/группа web1 существует и может выполнить php-cgi 
web/index.php без особых проблем.

Куда копать дальше?

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



             reply	other threads:[~2004-05-30 16:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-30 16:44 Eugene Prokopiev [this message]
2004-05-31 12:27 ` Klimchev Konstantin
2004-05-31 12:31   ` Klimchev Konstantin
2004-05-31 17:30   ` Eugene Prokopiev
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=40BA0F51.5040104@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