由於某種原因,我的主伺服器上的內容0rcan0mic.com
覆蓋了constantcounselling.com
另一台伺服器上的內容。我想要 hello world on而不是load onconstantcounselling.com
的內容。阿帕奇正在運行。0rcan0mic.com'
constantcounselling.com
此外,對於與(我的主伺服器)位於同一伺服器上的網域0rcan0mic.com
,會顯示 hello world,例如mybestfriendsarecats.com
和orcaaccounting.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>
非常感謝幫助,我已經堅持了好幾個星期了。