虚拟主机在另一台服务器上覆盖 Hello World

虚拟主机在另一台服务器上覆盖 Hello World

由于某种原因,我主服务器上的内容0rcan0mic.com覆盖了constantcounselling.com另一台服务器上的内容。我想获取 hello world而不是上加载constantcounselling.com的内容。Apache 正在运行。0rcan0mic.com'constantcounselling.com

此外,对于与(我的主服务器)位于同一台服务器上的域0rcan0mic.com,会显示 hello world,例如mybestfriendsarecats.comorcaaccounting.com

结果httpd -S

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using requin.themartialartsofmoney.com. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443                  requin.themartialartsofmoney.com (/etc/httpd/conf.d/ssl.conf:56)
*:80                   constantcounselling.com (/etc/httpd/conf.d/constantcounselling.com:1)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

虚拟主机

<VirtualHost *:80>
   
    ServerName constantcounselling.com
    ServerAlias www.constantcounselling.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/constantcounselling.com/public_html
    ErrorLog /var/log/httpd/constantcounselling.com-error.log
    CustomLog /var/log/httpd/constantcounselling.com-access.log combined


    <Directory "/var/www/constantcounselling.com/public_html">
      AllowOverride All
    </Directory>
    
  RewriteEngine on
  RewriteCond %{SERVER_NAME} =constantcounselling.com [OR]
  RewriteCond %{SERVER_NAME} =www.constantcounselling.com
  RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:80>
   
    ServerName 0rcan0mic.com
    ServerAlias www.0rcan0mic.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/0rcan0mic.com/public_html
    ErrorLog /var/log/httpd/0rcan0mic.com-error.log
    CustomLog /var/log/httpd/0rcan0mic.com-access.log combined


    <Directory "/var/www/0rcan0mic.com/public_html">
      AllowOverride All
    </Directory>
    
 RewriteEngine on
 RewriteCond %{SERVER_NAME} =www.0rcan0mic.com [OR]
 RewriteCond %{SERVER_NAME} =0rcan0mic.com
 RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
 </VirtualHost>

非常感谢您的帮助,我已经在这个问题上困扰了好几个星期了。

相关内容