I want to add Wildcard to DNS in my VPS (for setup Wordpress3.3.2 multisite). I have Kloxo, and when i want to add it from Manage DNS ( in Domain Adm ), i face with this error.
Alert: invalid_subdomain
Also i removed:
// Validates subdomain
if (!preg_match("/^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/", $param['hostname'])) {
throw new lxexception('invalid_subdomain', 'hostname');
}
from /usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/dns/dnsbaselib.php, but now sub-domains shows my IP address home. I want to setup it for this domain:310blog.com ,and my ip server is 178.162.231.63. ( for example when i make a sub-domain : http://saman.310blog.com/ , it shows Kloxo default page )
How can i fix it?
I solved it! if you want to add a wildcard into your Kloxo admin. You should follow these steps:
*
And in Value field:
YOU_IP_ADDRESS
When you press add, maybe you face with invalid_subdomain error. If this happens, you should edit "dnsbaselib.php" in /usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/dns/dnsbaselib.php, from your server, and remove this condition from line 104,
// Validates subdomain
if (!preg_match("/^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/", $param['hostname'])) {
throw new lxexception('invalid_subdomain', 'hostname');
}
After that retry first step.
<VirtualHost YOUR_IP_ADDRESS:80> ServerName YOUR_DOMAIN.com ServerAlias *.YOUR_RDOMAIN.com DocumentRoot /home/DOMAIN_DIR/YOUR_DOMAIN.com/ DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl ScriptAlias /awstats/ /home/kloxo/httpd/awstats/wwwroot/cgi-bin/ SuexecUserGroup USERNAME USERNAME </VirtualHost>
You have to use your IP address instead of YOUR_IP_ADDRESS, your domain name instead of YOUR_DOMAIN.com, your domain folder instead of DOMAIN_DIR and your username instead of USERNAME. 3. after that restart your httpd service.
/etc/init.d/httpd restart
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.