我想在我的VPS中添加通配符到DNS (用于设置Wordpress3.3.2多站点)。我有Kloxo,当我想从管理DNS (在Domain Adm中)添加它时,我会遇到这个错误。
Alert: invalid_subdomain 我还删除了:
// 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');
}从/usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/dns/dnsbaselib.php,,但现在的子域显示我的IP地址主页。我想为此domain:310blog.com设置它,我的ip服务器是178.162.231.63。(例如,当我创建一个子域:http://saman.310blog.com/时,它会显示Kloxo默认页面)
我怎么才能修复它?
发布于 2012-05-20 13:48:01
我解决了!如果你想在你的Kloxo管理员中添加一个通配符。您应该执行以下步骤:
*
在Value字段中:
YOU_IP_ADDRESS
当你按下add时,你可能会遇到invalid_subdomain错误。如果发生这种情况,您应该在服务器上编辑/usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/dns/dnsbaselib.php,中的"dnsbaselib.php“,并从第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');
}在此之后重试第一步。
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用户名用户名
你必须使用你的IP地址而不是YOUR_IP_ADDRESS,你的域名而不是YOUR_DOMAIN.com,你的域文件夹而不是DOMAIN_DIR,你的用户名而不是用户名。3.之后重启httpd服务。
/etc/init.d/httpd restarthttps://stackoverflow.com/questions/10648131
复制相似问题