Error on subdomain [try install openx on subdomain]

hello,

today i try to install openx on subdomain "openx.mydomain.com", when i try access i get "500 internal error", then i try "openx.mydomain.com/index.php" (i don't copy openx yet, just try url first) and that working. next i think need to add .htaccess with code:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !index.php
RewriteRule ^(.*)$ index.php/$1

it's work :)

next i copy openx to openx.mydomain.com and start installation, then i get infinite loop when it try "openx.mydomain.com/www/admin/install.php". i looking every apache conf that i know to add some code or delete it because all i know this because apache conf especially rewrite engin.

/ect/apache2/*
/var/www/new/ehcp/apache_default.conf
/var/www/new/ehcp/apachehcp_auth.conf
/var/www/new/ehcp/apachehcp.conf
/var/www/new/ehcp/apachehcp_passivedomains.conf
/var/www/new/ehcp/apachehcp_subdomains.conf
/var/www/new/ehcp/apache_subdomain_template
/var/www/new/ehcp/apachetemplate
/var/www/new/ehcp/apachetemplate_ipbased
/var/www/new/ehcp/apachetemplate_passivedomains

but i don't find anything about redirect, so i try to add some code to my .htaccess parent web (.../httpdocs/.htaccess) and delete .htaccess on openx.mydomain.com :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !index.php
RewriteCond %{REQUEST_FILENAME} !static
RewriteCond %{REQUEST_FILENAME} !robots.txt
RewriteCond %{REQUEST_FILENAME} !openx
RewriteCond %{REQUEST_FILENAME} !^subdomains # this line
RewriteRule ^(.*)$ index.php/$1

but the result still same, infinite loop :(

at last i force change apache subdomain configuration on /var/www/new/ehcp/apachehcp_subdomains.conf:

ServerName openx.mydomain.com
ServerAlias www.openx.mydomain.com
UseCanonicalName Off

DocumentRoot /var/www/vhosts/mydomain.com/mydomain.com/httpdocs/openx

#CustomLog /var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx/logs/access_log combined # homedir yerine, doma$
CustomLog /var/log/apache_common_access_log combined

php_admin_value open_basedir /var/www/vhosts/mydomain.com/mydomain.com/httpdocs/openx
php_admin_value upload_tmp_dir /var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx/phptmpdir
php_admin_value session.save_path /var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx/phptmpdir

and the result, it redirect to ...httpdocs/openx/www/admin/index.php (sorry, before on middle i try edit apache conf i was install openx under root domain "mydomain.com/openx/").

on the last i still think why subdomain that i try not working correctly and i found "# this is changed to *.mydomain.com within classapp.php" and i try to read classapp.php, but it to complex. so i decide let it be, install under .../httpdocs/openx directory and may be try to fix again latter :D

so anyone can help my problem or tell me where i can go to fix my problem ?

Thank you.

i use debian 6.0.3 and ehcp Version: 0.30.7

Newbie always

I use openx in a sub,

but from your template i can see you have not ajusted your open base, it should be: php_admin_value open_basedir On

not: php_admin_value open_basedir /var/www/vhosts/mydomain.com/mydomain.com/httpdocs/openx

thank for reply, but is open_basedir can set 'On' ? from php (http://php.net/manual/en/ini.core.php) say string path for value open_basedir.

ok, let me try first :)

btw, that value (/var/www/vhosts/mydomain.com/mydomain.com/httpdocs/openx) is from default ehcp when i create subdomain. thank you.

Newbie always

it not work, when i try change open_basedir value from "/var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx" to "On" (without parenthezis) on apachehcp_subdomains.conf.

it say :

[Sat Jun 23 11:41:02 2012] [error] [client 118.99.70.133] PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx/index.php) is not within the allowed path(s): (On) in Unknown on line 0
[Sat Jun 23 11:41:02 2012] [error] [client 118.99.70.133] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
[Sat Jun 23 11:41:02 2012] [error] [client 118.99.70.133] PHP Fatal error: Unknown: Failed opening required '/var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

Newbie always

this error if open_basedir set to "/var/www/vhosts/mydomain.com/mydomain.com/httpdocs/subdomains/openx"

http://i.cubeupload.com/TOVxVL.png

may be this screenshot useless, but hope helped :)

Newbie always

Im so sorry, its not: On, it needs to be none, use this:

php_admin_value open_basedir none

the result still same "too many redirect", maybe you can tell me where was wrong my .htaccess (if my .htaccess can cause my problem):

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !index.php
RewriteCond %{REQUEST_FILENAME} !static
RewriteCond %{REQUEST_FILENAME} !robots.txt
RewriteCond %{REQUEST_FILENAME} !openx

# !^subdomains or !subdomains still same
RewriteCond %{REQUEST_FILENAME} !subdomains
RewriteRule ^(.*)$ index.php/$1

i place on root directory (mydomain.com/httpdocs/.htaccess).

thank you.

Newbie always

I never had to change anything in openx, can you confirm you are using ehcp 30.7 or above? because ehcp has subdomain problem before that version,

also did you add the code into main domain conf and the subdomain conf then restart ehcp then apache2?

my version ehcp is 0.30.7 and ervery time i had change to *.conf i always restart my apache2.

Newbie always