1
我在Debian喘息和標準的PHP 5.3和FastCGI運行的Virtualmin與Apache2的符號鏈接到不同的用戶/ home目錄下的PHP腳本:「沒有輸入文件中指定」
我有一個網站,調用一個符號鏈接指向在另一個用戶的主目錄下的PHP文件
這樣的/ home /用戶1 /的public_html /廣告投放/被鏈接到/ home /用戶2 /的public_html/
的問題是,如果我直接訪問user2的PHP文件,它工作,但如果我通過符號鏈接訪問它只是吐出「沒有指定輸入文件」(我想fastcgi沒有找到文件的路徑?)
這是我的,對於user2 php5.fcgi:
#!/bin/bash
PHPRC=$PWD/../etc/php5
export PHPRC
umask 022
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=99999
export PHP_FCGI_MAX_REQUESTS
SCRIPT_FILENAME=$PATH_TRANSLATED
export SCRIPT_FILENAME
exec /usr/bin/php5-cgi
這是我對於虛擬服務器的Apache的conf: <
VirtualHost XXXXXXXXXXX:80>
SuexecUserGroup "#1012" "#1012"
ServerName adserve.com
ServerAlias www.adserve.com
ServerAlias webmail.adserve.com
ServerAlias admin.adserve.com
DocumentRoot /home/adserve/public_html
ErrorLog /var/log/virtualmin/adserve.com_error_log
CustomLog /var/log/virtualmin/adserve.com_access_log combined
ScriptAlias /cgi-bin/ /home/adserve/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/adserve/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/adserve/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/adserve/fcgi-bin/php5.fcgi .php5
</Directory>
<Directory /home/adserve/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.adserve.com
RewriteRule ^(.*) https://adserve.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.adserve.com
RewriteRule ^(.*) https://adserve.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
php_admin_value engine Off
IPCCommTimeout 31
FcgidMaxRequestLen 1073741824
</VirtualHost>
(域adserve.com只是一個佔位符)
有關如何解決fcgi路徑分辨率問題的任何建議(如果這確實是問題)?
感謝
是'PHPRC = $ PWD /../等/ php5'沒有問題的工作?通過符號鏈接訪問時沒有錯? (我不這樣做,所以我可以完全關閉這個。) –
你檢查了你的權限嗎?因爲你試圖用user2訪問user1文件,suexec不會允許它。 –
我已經嘗試禁用fastcgi並使php運行爲mod_php與Apache的用戶...但我仍然得到完全相同的行爲 – TheHackerman