Adding subdomain.

Discussion in 'Installation/Configuration' started by karuott, Jan 19, 2012.

  1. karuott

    karuott New Member

    Hello!
    I have problem when i'm trying to add subdomain. It says always
    ERROR

    Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/

    And apache logs i have that error:
    [Thu Jan 19 10:18:20 2012] [error] [client X] PHP Warning: preg_match(): Compilation failed: POSIX collating elements are not supported at offset 3 in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 729, referer: http://address.where.my.panel.is/index.php

    Same thing is when i'm trying to add aliasdomain.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This means that you entered something wrong in the redirect feld. So what exactly did you enter in the field?
     
  3. karuott

    karuott New Member

    So, i need a subdomain what shows things from one of the domain subfolders.
    Like i have subdomain.example.com and it shows things from subdomain folder which is in the example.com web folder.

    Host subdomain
    Domain example.com
    Redirect Type L
    Redirect Path web/subdomain

    Active

    I tried that.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try that:

    Host subdomain
    Domain example.com
    Redirect Type NoFlag
    Redirect Path /subdomain/

    But if a subdomain shall have its own directory e.g. when you plan to install a cms system into that directory, then you should create a new wesbite for this subdomain instaed of using the subdomain function as described in the manual.
     
  5. karuott

    karuott New Member

    Same error.

    I even did 777 chmod for that subdomain folder. Still nothing. I have tried to put URL to redirect path but gives that same error.

    I need that subdomain for ftp and i'd like that subdomain and domain have the same quota.
     
    Last edited: Jan 19, 2012
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is that you did not post the real data that you entered, so we can not tell you whats wrong. Please post the real data that you entered in the field or post a screenshot.
     
  7. karuott

    karuott New Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check that you have no whitespace after /ftp/ in the redirect path field.
     
  9. karuott

    karuott New Member

    No, i don't have any whitespaces.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    And you use the current ISPConfig version (3.0.4.2) ?
     
  11. karuott

    karuott New Member

    Exactly.
    Operating system is openSuse 12.1

    Maybe if you have time, i'll do a test account for you and you can try it.
     
    Last edited: Jan 19, 2012
  12. karuott

    karuott New Member

    Any ideas whats the problem, i'm quite stuck here.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    I've added the same domain and subdomain on my test system with ISPConfig 3.0.4.2 and it gets added without an error.
     
  14. karuott

    karuott New Member

    We've found the problem. I don't know why but conflict was bold line in web_subdomain.tform.php, web_alias.. and web_domain..
    'type'=>'REGEX', 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+:)\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+:)\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))[email protected]'

    we changed it:

    '@^(((https?://)?([-\w\.]+)+:)\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+:)\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))[email protected]'

    And now it works. Kinda strange problem.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so there must be a sign which is not allowed but invisible at the beginning of your path. Maybe you copied the path from somewhere and a carriage return was in front of the copied string or a similar issue as the change in your regex just allows that there is a char at the beginning which is normally not allowed for a path.

    Instead of editing the regex, which allos now possible attacks on your system by enabling a wildcard char at the beginning of the string, you should delete the subdomain, then enter it again and type the char with the keyboard. It definately works with the regex that is part of ISPConfig.
     
  16. bank

    bank New Member

    Having the same problem.. Looks I've found the root of this problem.

    Have two servers - both running OpenSUSE 12.1 x86_64 with latest ISPConfig.
    One had 3.0.4.1 and same error, updated to 3.0.4.2 - same.

    The problem is, that PHP included in OpenSUSE 12.1 x86_64 have the bug:

    http://drupal.org/node/1255780

    http://bugs.exim.org/show_bug.cgi?id=1136

    Regex fails to compile with PCRE 8.13
    And the php reports:
    Code:
    pcre
    PCRE (Perl Compatible Regular Expressions) Support 	enabled
    PCRE Library Version 	8.13 2011-08-16 
    
    That's the bugged version.
    Not sure what to do...
    I can't add alias, subdomain or anything atm...
     
  17. bank

    bank New Member

    Installed PCRE version 8.12 and all is working fine now.
     

Share This Page