微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

apache 虚拟主机EAI 2名称或服务未知:AH00547:无法解析主机名

如何解决apache 虚拟主机EAI 2名称或服务未知:AH00547:无法解析主机名

我收到此错误,我的网站无法启动 (EAI 2)名称或服务未知:AH00547:无法解析主机名 betatgh.tgi.na -- 忽略!

我的主机配置文件看起来像那样

    ServerName betatgh.tgi.na
    ServerAdmin itwhk@tgh.na
    ServerAlias www.betatgh.tgi.na
    DocumentRoot /var/www/betatgh.tgi.na
    #Redirect "/" "http://betatgh.tgi.na/"
    <Directory /var/www/betatgh.tgi.na/>
       Options Indexes FollowSymLinks
       Require all granted
       AllowOverride all
    </Directory>

    

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/,which are
    # enabled or disabled at a global level,it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf

vim: 语法=apache ts=4 sw=4 sts=4 sr noet

解决方法

你必须在你的 dns 中定义 betatgh.tgi.na。

例如使用 CNAME 指向 tgi.na

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。