Apache2 虚拟主机重定向到错误的域

Apache2 虚拟主机重定向到错误的域,apache2,virtualhost,Apache2,Virtualhost,我有多个虚拟主机,一切都运行得很好,今天我添加了一个额外的主机,现在我以前的所有主机都重定向到新主机 这就是我运行apache2ctl-S时得到的结果 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

我有多个虚拟主机,一切都运行得很好,今天我添加了一个额外的主机,现在我以前的所有主机都重定向到新主机

这就是我运行apache2ctl-S时得到的结果

   AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
104.131.79.162:443     domain1.com (/etc/apache2/sites-enabled/domain1.com-le-ssl.conf:2)
104.131.79.162:80      domain1.com (/etc/apache2/sites-enabled/domain1.com.conf:2)
*:443                  is a NameVirtualHost
         default server domain2 (/etc/apache2/sites-enabled/domain2.com-le-ssl.conf:2)
         port 443 namevhost domain2.com (/etc/apache2/sites-enabled/domain2.com-le-ssl.conf:2)
                 alias www.domain2.com
         port 443 namevhost domain3.com (/etc/apache2/sites-enabled/domain3.com-le-ssl.conf:2)
                 alias www.domain3.com
         port 443 namevhost domain4.com (/etc/apache2/sites-enabled/domain4.com-le-ssl.conf:2)
                 alias www.domain4.com
         port 443 namevhost domain1.com (/etc/apache2/sites-enabled/domain1.com-le-ssl.conf:2)
                 alias www.domain1.com
                 alias domain1.com
*:80                   is a NameVirtualHost
         default server domain2.com (/etc/apache2/sites-enabled/domain2.com.conf:1)
         port 80 namevhost domain2.com (/etc/apache2/sites-enabled/domain2.com.conf:1)
                 alias www.domain2.com
         port 80 namevhost domain3.com (/etc/apache2/sites-enabled/domain3.com.conf:1)
                 alias www.domain3.com
         port 80 namevhost domain4.com (/etc/apache2/sites-enabled/domain4.com.conf:1)
                 alias www.domain4.com
         port 80 namevhost domain1.com (/etc/apache2/sites-enabled/domain1.com.conf:2)
                 alias www.domain1.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
知道发生了什么吗


编辑:

最后添加的vhost配置如下所示:

<VirtualHost *:80>
        ServerAdmin myemail@mail.com
    ServerName domain1.com
        DocumentRoot /var/www/domain1.com/public_html

        <Directory /var/www/domain1.com/public_html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

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

        <IfModule mod_dir.c>
            DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
        </IfModule>

</VirtualHost>

服务器管理员myemail@mail.com
ServerName域名1.com
DocumentRoot/var/www/domain1.com/public\u html
选项索引跟随符号链接
允许超越所有
要求所有授权
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
DirectoryIndex.php index.pl index.cgi index.html index.xhtml index.htm

你能添加新的vhost配置吗?刚刚添加,但不应该有任何奇怪的东西。你能添加新的vhost配置吗?刚刚添加,但不应该有任何奇怪的东西