NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.domain1.com
DocumentRoot "/var/www/html/home/"
ScriptAlias /cgi-bin/awstats /var/www/cgi-bin/awstats
Alias /awstats /var/www/html/awstats
Alias /myadmin /var/www/html/myadmin
ScriptAlias /mailman/ /var/www/cgi-bin/mailman/
Alias /pipermail/ /var/mailman/archives/public/
Alias /horde /var/www/html/horde
SuexecUserGroup webadmin webadmin
ServerAdmin "[email protected]"
ScriptAlias "/cgi-bin/" "/home/webadmin/domain1.com/cgi-bin/"
CustomLog "/home/webadmin/domain1.com/access_log" "combined"
ErrorLog "/home/webadmin/domain1.com/error_log"
<Directory /home/webadmin/domain1.com/html>
Options Includes FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.sec.com
DocumentRoot "/var/www/html/home/sec"
</VirtualHost>
<VirtualHost *:443>
ScriptAlias /cgi-bin/awstats /var/www/cgi-bin/awstats
Alias /awstats /var/www/html/awstats
Alias /myadmin /var/www/html/myadmin
ScriptAlias /mailman/ /var/www/cgi-bin/mailman/
Alias /pipermail/ /var/mailman/archives/public/
Alias /horde /var/www/html/horde
ServerName www.domain1.com
DocumentRoot /var/www/html/home/
SuexecUserGroup webadmin webadmin
ServerAdmin "[email protected]"
ScriptAlias "/cgi-bin/" "/home/webadmin/domain1.com/cgi-bin/"
CustomLog "/home/webadmin/domain1.com/access_log" "combined"
ErrorLog "/home/webadmin/domain1.com/error_log"
SSLCertificateFile /etc/httpd/conf/ssl.crt/domain1.com.hspc.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/domain1.com.hspc.key
SSLEngine on
<Directory /home/webadmin/domain1.com/html>
Options Includes FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
答案1
没有重定向到 www.domain1.com 您需要在请求中发送正确的标头,其中 Host: 是 www.sec.com
curl -H 'Host:www.sec.com' http://YOUR_IP
或者将其放入主机文件中。