I have EHCP installed because it's simple and helpful on server with few FTP accounts and websites. It's testing only server.
Problem is: I can access *.avki.zgarnijlicke.pl, *.kierowca.zgarnijlicke.pl but *.zgarnijlicke.pl isn't working.
My config's are:
a) Apache template:
#____________start of {domainname}__paneluser:{panelusername}_reseller:{reseller}_id:{id}____________
# explanation {aciklama}
<VirtualHost *> ServerName {domainname} ServerAlias www.{domainname} # buraya aliaslar yazilacak.. {aliases}
UseCanonicalName Off
DocumentRoot {homedir}/httpdocs
ScriptAlias /cgi-bin/ {homedir}/httpdocs/cgi-bin/
\# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog {homedir}/logs/access_log combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir {homedir}
php_admin_value upload_tmp_dir {homedir}/phptmpdir
php_admin_value session.save_path {homedir}/phptmpdir
AccessFileName .htaccess
<Directory {homedir}>
AllowOverride all
</Directory>
{customhttp}
</VirtualHost>
<VirtualHost *> ServerName webmail.{domainname} ServerAlias mail.{domainname} ServerAlias email.{domainname}
DocumentRoot /var/www/vhosts/ehcp/webmail
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog {homedir}/logs/access_log combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/ehcp/webmail
php_admin_value upload_tmp_dir /var/www/vhosts/ehcp/webmail/data
php_admin_value session.save_path /var/www/vhosts/ehcp/webmail/data
</VirtualHost>
<VirtualHost *> ServerName cpanel.{domainname} ServerAlias panel.{domainname} ServerAlias ehcp.{domain开发者_高级运维name} ServerAlias cp.{domainname}
DocumentRoot /var/www/vhosts/ehcp/
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/ehcp/
</VirtualHost> #____________end of {domainname}__paneluser:{panelusername}_reseller:{reseller}_id:{id}____________
b) apache Aliases:
*.zgarnijlicke.pl
*.avki.zgarnijlicke.pl
*.kierowca.zgarnijlicke.pl
c) DNS template
$TTL 86400
@ IN SOA ns.{domainname}. {dnsemail} (
{serial} ; Serial
10800 ; Refresh
1200 ; Retry
86400 ; Expire
86400 ); Minimum
{domainname}. IN NS ns.{domainname}. ns.{domainname}. IN A {dnsip} ns1.{domainname}. IN A {dnsip} ns2.{domainname}. IN A {dnsip} dns.{domainname}. IN A {dnsip} dns1.{domainname}. IN A {dnsip} dns2.{domainname}. IN A {dnsip} {domainname}. IN A {webip} mail.{domainname}. IN A {mailip} smtp.{domainname}. IN A {webip} webmail.{domainname}. IN A {webip} ftp.{domainname}. IN CNAME {domainname}. www.{domainname}. IN CNAME {domainname}. {domainname}. IN MX 10 mail.{domainname}. {domainname}. IN TXT "v=spf1 a mx"
{customdns} *.{domainname} 14400 IN A {domainname}
Solved.
Aliases:
DNS template:
*.zgarnijlicke.pl
$TTL 86400
@ IN SOA ns.{domainname}. {dnsemail} (
{serial} ; Serial
10800 ; Refresh
1200 ; Retry
86400 ; Expire
86400 ) ; Minimum
{domainname}. IN NS ns.{domainname}. ns.{domainname}. IN A {dnsip} ns1.{domainname}. IN A {dnsip} ns2.{domainname}. IN A {dnsip} dns.{domainname}. IN A {dnsip} dns1.{domainname}. IN A {dnsip} dns2.{domainname}. IN A {dnsip} {domainname}. IN A {webip} mail.{domainname}. IN A {mailip} smtp.{domainname}. IN A {webip} webmail.{domainname}. IN A {webip} ftp.{domainname}. IN CNAME {domainname}. www.{domainname}. IN CNAME {domainname}. {domainname}. IN MX 10 mail.{domainname}. {domainname}. IN TXT "v=spf1 a mx"
{customdns}
- IN A {webip}
Apache template without changes.
Now, everything it's working. asd.qwe.qwe.asd.qwe.asd.zgarnijlicke.pl and hello.zgarnijlicke.pl
You can not use a domain name as the right hand side of an A record assignment. *.{domainname} 14400 IN A {domainname}
Try the following instead:
*.{domainname} 14400 IN CNAME {domainname}
or if you need to use an A record then try
*.{domainname} 14400 IN A {webip}
精彩评论