Current time: 11-14-2024, 05:17 PM Hello There, Guest! (LoginRegister)


Post Reply 
[solved] Problem with vHost for psyBNC
Author Message
DaSilva Offline
Member
***

Posts: 302
Joined: Dec 2007
Reputation: 0
Post: #1
Question [solved] Problem with vHost for psyBNC
I have a problem with the vHost for psyBNC.
The site is loading and loading and loading and ends with an error 500.
Here is the part of the 00_master.conf:

Code:
# psyBNC
<VirtualHost 193.34.68.126:80>

    ServerAdmin     support[at]frefel.net
    DocumentRoot    /var/www/psybnc

    ServerName      bouncer.frefel.net
    ServerAlias     bouncer.*

    ErrorLog        /var/log/apache2/users/psybnc-error.log
    TransferLog     /var/log/apache2/users/psybnc-access.log

    CustomLog       /var/log/apache2/psybnc-traf.log traff
    CustomLog       /var/log/apache2/psybnc-combined.log combined


<IfModule suexec_module>
           SuexecUserGroup psybnc psybnc
    </IfModule>

    <Directory /var/www/psybnc>
        Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule mod_fastcgi.c>
        ScriptAlias /php4/ /var/www/fcgi/psybnc/
        ScriptAlias /php5/ /var/www/fcgi/psybnc/
        <Directory "/var/www/fcgi/psybnc">
            AllowOverride None
            Options +ExecCGI MultiViews -Indexes
            Order allow,deny
            Allow from all
        </Directory>
    </IfModule>

    <IfModule mod_php4.c>
        <Directory /var/www/psybnc>
            php_admin_value open_basedir "/var/www/psybnc/:/var/www/psybnc/phptmp:/proc/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/share/php:/usr/share/pear"
            php_admin_value session.save_path "/var/www/psybnc/phptmp/"
        </Directory>
    </IfModule>
    <IfModule mod_php5.c>
        <Directory /var/www/psybnc>
            php_admin_value open_basedir "/var/www/psybnc/:/var/www/psybnc/phptmp:/proc/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/share/php:/usr/share/pear"
            php_admin_value session.save_path "/var/www/psybnc/phptmp/"
        </Directory>
    </IfModule>

</VirtualHost>

/var/log/apache2/error.log says often

Quote:[Wed Apr 02 21:45:06 2008] [warn] FastCGI: (dynamic) server "/var/www/fcgi/psybnc/php5-fcgi-starter" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

/var/www/fcgi/psybnc/php5-fcgi-starter looks like this:

Code:
#!/bin/sh

umask 022

PHPRC="/var/www/fcgi/psybnc/php5/"

export PHPRC
PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_MAX_REQUESTS

exec /usr/bin/php5-cgi

User and group "psybnc" have all rights at /var/www/psybnc and /var/www/fcgi/psybnc but with the problem of "endless" loading and error 500.
;open_basedir is commented (Wink
What could be the problem?
Thanks in advance.

EDIT:

A simple

Quote:Alias /bouncer "/var/www/psybnc"

shows me the right site but with this errors:

Quote:Warning: include(lang_dn.inc.php) [function.include]: failed to open stream: No such file or directory in /var/www/psybnc/config.php on line 13

Warning: include() [function.include]: Failed opening 'lang_dn.inc.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/psybnc/config.php on line 13

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/psybnc/index.php on line 16

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'vu2001'@'localhost' (using password: NO) in /var/www/psybnc/index.php on line 17

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /var/www/psybnc/index.php on line 17

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /var/www/psybnc/config.php:13) in /var/www/psybnc/index.php on line 19

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/psybnc/config.php:13) in /var/www/psybnc/index.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /var/www/psybnc/config.php:13) in /var/www/psybnc/index.php on line 34

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /var/www/psybnc/index.php on line 3933
(This post was last modified: 04-04-2008 11:42 PM by joximu.)
04-03-2008 05:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #2
RE: Problem with vHost for psyBNC
Please consult psybnc Forum. This has nothing to do with ispcp itself.

When you follow your postet log you will see many error's where you can fix on your own.
04-03-2008 07:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #3
RE: Problem with vHost for psyBNC
Please also read/learn the differences from mod-php to php fastcgi and how to set php-settings in the latter case.
04-03-2008 07:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply
DaSilva Offline
Member
***

Posts: 302
Joined: Dec 2007
Reputation: 0
Post: #4
RE: Problem with vHost for psyBNC
The errors from the script are not important in this forum.
I know that.
Because of that the real question was how to setup the correct entry in the 00_master.conf to display the site as global subdomain "bouncer.domain.de".
So my question is:
What is wrong with my psyBNC vHost?
Thanks in advance.
04-03-2008 05:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Problem with vHost for psyBNC
So, folder /var/www/fcgi/psybnc/ und below belongs to psybnc:psybnc?

please use a simple php script to test, so you can exclude errors from the psybnc-software (which may be addressed in a second step).

The settings look ok so far.

Anything in suexec.log?
(This post was last modified: 04-03-2008 06:53 PM by joximu.)
04-03-2008 06:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
DaSilva Offline
Member
***

Posts: 302
Joined: Dec 2007
Reputation: 0
Post: #6
RE: Problem with vHost for psyBNC
suexec.log:

Quote:[2008-04-03 06:15:32]: uid: (psybnc/psybnc) gid: (2016/2016) cmd: php5-fcgi-starter
[2008-04-03 06:15:32]: target uid/gid (2016/2016) mismatch with directory (2016/0) or program (2016/2001)
[2008-04-03 06:25:11]: uid: (vu2000/vu2000) gid: (vu2000/vu2000) cmd: php5-fcgi-starter

(psybnc has user and group id 2016)

Hmm, strange.
If I create a simple *.html file it is displayed correctly.
If I create a simple *.php file it is the same problem like the psybnc files (they are written in PHP also. So it seems to be a problem with *.php files.
What could that be?
Alias /bouncer "/var/www/psybnc/" displays *.php files correctly.
Thanks.

and many of

Quote:[2008-04-03 10:21:40]: uid: (vu2013/vu2013) gid: (2013/2013) cmd: php5-fcgi-starter

with different users.
(This post was last modified: 04-03-2008 09:05 PM by DaSilva.)
04-03-2008 07:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #7
RE: Problem with vHost for psyBNC
the line with the word "mismatch" says it all!

set the permissions/ownerschip of the php starter script correctly!!!
04-04-2008 05:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply
DaSilva Offline
Member
***

Posts: 302
Joined: Dec 2007
Reputation: 0
Post: #8
RE: Problem with vHost for psyBNC
/var/www/fcgi/psybnc/php5-fcgi-starter has already the owner "psybnc" and the permission "750".
Should I do a "chown 2016 /var/www/fcgi/psybnc/php5-fcgi-starter"?
But even with "chmod 777 /var/www/fcgi/psybnc/php5-fcgi-starter" the problem persists.
04-04-2008 06:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #9
RE: Problem with vHost for psyBNC
You set in apache:
SuexecUserGroup psybnc psybnc

I don't know the uid/gid of theese but suexec is veryspecial with this. It's about security!

target uid/gid (2016/2016) mismatch with directory (2016/0) or program (2016/2001):

means: the group of the folder is root and should not be root.

Please have a look on the other /var/www/fcgi/* and do it the same way but with the right user AND group.
04-04-2008 07:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
DaSilva Offline
Member
***

Posts: 302
Joined: Dec 2007
Reputation: 0
Post: #10
RE: Problem with vHost for psyBNC
/etc/passwd :

Code:
psybnc:x:2016:2016::/home/psybnc/:/bin/sh

/etc/goup :

Code:
psybnc:x:2016:

/var/www/psybnc , -R /var/www/psybnc/* , /var/www/fcgi/psybnc and -R /var/www/fcgi/psybnc/* are all owned by psybnc.
/var/www/fcgi is owned by vu2000.
So everything seems to me like the other entries.
What could be the problem?
04-04-2008 05:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)