subdomain redirect problem

Discussion in 'Apache' started by scarpa, Jun 9, 2010.

  1. #1
    Hi All,
    I have http://www.domain.com on 80 port
    I have and httpS://sub.domain.com on port 443

    The problem is that when i try http://sub.domain.com ... redirect me to http://domain.com ..
    I want to forbid http://sub.domain.com ...
    how to make only httpS://sub.domain.com works
    my conf. file is :

    Listen *:80
    Listen *:443
    NameVirtualHost *:80
    NameVirtualHost *:443

    <VirtualHost *:80>
    ServerName domain.com
    <Directory /www/domain>
    allow from all
    </Directory>
    </VirtualHost>

    <VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile /path to crt
    SSLCertificateKeyFile /path to key
    ServerName sub.domain.com
    <Directory /www/domain/subdomain>
    allow from all
    </Directory>
    </VirtualHost>

    Thanks
     
    scarpa, Jun 9, 2010 IP
  2. scarpa

    scarpa Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    help ... problem still exist
     
    scarpa, Jun 10, 2010 IP