sentora / sentora-core

Sentora is a web hosting control panel written in PHP for *NIX
GNU General Public License v3.0
648 stars 446 forks source link

Error with sub-domain #246

Closed wings40 closed 8 years ago

wings40 commented 8 years ago

Hello, when I try to add a sub-domain occurs an error: Your Domain name is not valid. Please enter a valid Domain Name: i.e. 'domain.com' And and it's not possible create an email-box (The selected domain was not valid.)

screenshot_2 screenshot_1

Thanks,

Augusto

ghost commented 8 years ago

I've the same problem with .org domains. Temporary solution is add subdomain as domain.

eByte23 commented 8 years ago

@wings40, have you got the latest version of the repo? If not I'd try copying the subdomain module folder from the src here and putting into your site to see if that works.

wings40 commented 8 years ago

@eByte23, I suppose yes, I install it with this command line: bash <(curl -L -Ss http://sentora.org/install)

TGates71 commented 8 years ago

What OS are you using? What Sentora version (1.0.0 or 1.0.3)? Are you using the zadmin account or a user account?

wings40 commented 8 years ago

I'm using Ubuntu 14.04 and Sentora version is 1.0.3. I'm using zadmin account.

TGates71 commented 8 years ago

Interesting, I have the same setup and no problems. I just tested adding the exact domain and sub domain you entered above and it worked just fine. (Ubuntu 14.04/Sentora 1.0.3)

TGates71 commented 8 years ago

Are all the files and folders in /etc/sentora/ owned by apache? (www-data) And set to 755?

wings40 commented 8 years ago

All the files and folders are in the default way. The script installer do everything.

eByte23 commented 8 years ago

@wings40 I'd assume that I'd you copied the module it will work or if you do a diff there will be changes to the file

MBlagui commented 8 years ago

For me it's a bug.

It's related how we check if subdomain is valid. It should only look if it's sub.EXISTINGDOMAIN. not check how many dots we have in it.

I need to check back the routine.

aldemaroc commented 8 years ago

Is there any workaround? The TLD .com.br do not work too.

ghost commented 8 years ago

@AldemaroC yes, u can add subdomain as domain.

MBlagui commented 8 years ago

issue is here:

https://github.com/sentora/sentora-core/blob/master/modules/sub_domains/code/controller.ext.php

I think IsValidDomainName() regex there need to be modified.

aldemaroc commented 8 years ago

How does sentora check if a domain is valid? I'd be glad to fix it and pull to github. I can't even create mailbox for my domains (even if there is only one dot).

EDIT: I downloaded the github version and upload to "/etc/sentora/panel/modules". This problem is just present with the installer.

MBlagui commented 8 years ago

Used the same domain. Able to create mailbox. This is not an issue I'm currently trying to track.

Not a bug using domain.cu.cc. Please use the forum if you still face the issue.

http://forums.sentora.org/

Closing this issue.

M B