Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
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 "webadmin@domain1.com"
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 "webadmin@domain1.com"
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>

Thank you for your help. Jeff

share|improve this question
    
Ops sorry, it's working ok. Thank you! –  jeff Apr 9 '11 at 21:59

1 Answer 1

is not redirecting to www.domain1.com you need to send into your request the proper header where Host: is the www.sec.com

curl -H 'Host:www.sec.com' http://YOUR_IP

or have it into the host file.

share|improve this answer
    
Thanks for helping! So I have 2 options: add header to my web pages OR have something in my .htaccess file ? thank you –  jeff Apr 9 '11 at 21:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.