Weird problem with a subdomain

mkniskanen

Verified User
Joined
Sep 17, 2008
Messages
79
Location
Lieksa, Finland
Hello again.

Today I encountered something I have no explanation for. I have used subdomains for ages but after creating a subdomain for an old domain trying to install wikimedia for it I was faced with a weird phenomenon.

The subdomain is simply wiki.mycustomerdomain.com and it it resides under public_html/wiki. The mediawiki installation script tries to load config/index.php but the screen turns blank. Checking the source code from the browser reveals this:
Code:
<?
header("Location: http://".$_SERVER['HTTP_HOST'].":2222");
?>
So I assume DA is interfering here and outputting a php redirection code BUT WITH NOW ILLEGAL SHORT TAGS(!!!!) Where on earth does this take place and why? This happens with any file from the public_html/wiki/config directory and only in this very subdomain. There are two more subdomains which work as expected.

EDIT: Found where the code is. It is in
Code:
/usr/local/directadmin/scripts/redirect.php
EDIT2: Sigh, that file has a proper tag "<?php" so I still have no idea where that redirection code has been grabbed from.

markku
 
Last edited:

mr.applesauce

Verified User
Joined
Jun 3, 2009
Messages
557
Because directadmin ships with /config as an alias for login to directadmin.

Edit:

/etc/httpd/conf/extra/httpd-alias.conf

Then restart apache.
 

mkniskanen

Verified User
Joined
Sep 17, 2008
Messages
79
Location
Lieksa, Finland
Because directadmin ships with /config as an alias for login to directadmin.
Thanks! That was it! And the <? was really from the original DirectAdmin installation in September 2008 :)

I would have used dozens of hours on this had I not asked for help here! The DA community rocks!

Markku
 
Top